Skip to content

Commit

Permalink
Atomic codegen tests: clang-cuda reorders some arguments, include the…
Browse files Browse the repository at this point in the history
…m in the DAG to fix CI failures
  • Loading branch information
wmaxey committed Oct 7, 2024
1 parent 71376e9 commit 0479ebd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libcudacxx/test/atomic_codegen/atomic_add_non_volatile.cu
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ __global__ void add_relaxed_device_non_volatile(int* data, int* out, int n)
; SM8X-DAG: ld.param.u64 %rd[[#ATOM:]], {{.*}}[[FUNCTION]]_param_0{{.*}}
; SM8X-DAG: ld.param.u64 %rd[[#RESULT:]], {{.*}}[[FUNCTION]]_param_1{{.*}}
; SM8X-DAG: ld.param.u32 %r[[#INPUT:]], {{.*}}[[FUNCTION]]_param_2{{.*}}
; SM8X-NEXT: cvta.to.global.u64 %rd[[#GOUT:]], %rd[[#RESULT]];
; SM8X-DAG: cvta.to.global.u64 %rd[[#GOUT:]], %rd[[#RESULT]];
; SM8X-NEXT: {{/*[[:space:]] *}}atom.add.relaxed.gpu.s32 %r[[#DEST:]],[%rd[[#ATOM]]],%r[[#INPUT]];{{[[:space:]]/*}}
; SM8X-NEXT: st.global.u32 [%rd[[#GOUT]]], %r[[#DEST]];
; SM8X-NEXT: ret;
Expand Down
4 changes: 2 additions & 2 deletions libcudacxx/test/atomic_codegen/atomic_cas_non_volatile.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ __global__ void cas_device_relaxed_non_volatile(int* data, int* out, int n)
; SM8X-DAG: ld.param.u64 %rd[[#ATOM:]], {{.*}}[[FUNCTION]]_param_0{{.*}}
; SM8X-DAG: ld.param.u64 %rd[[#EXPECTED:]], {{.*}}[[FUNCTION]]_param_1{{.*}}
; SM8X-DAG: ld.param.u32 %r[[#INPUT:]], {{.*}}[[FUNCTION]]_param_2{{.*}}
; SM8X-NEXT: cvta.to.global.u64 %rd[[#GOUT:]], %rd[[#EXPECTED]];
; SM8X-NEXT: ld.global.u32 %r[[#LOCALEXP:]], [%rd[[#INPUT]]];
; SM8X-DAG: cvta.to.global.u64 %rd[[#GOUT:]], %rd[[#EXPECTED]];
; SM8X-DAG: ld.global.u32 %r[[#LOCALEXP:]], [%rd[[#INPUT]]];
; SM8X-NEXT: {{/*[[:space:]] *}}atom.cas.relaxed.gpu.b32 %r[[#DEST:]],[%rd[[#ATOM]]],%r[[#LOCALEXP]],%r[[#INPUT]];{{[[:space:]]/*}}
; SM8X-NEXT: st.global.u32 [%rd[[#GOUT]]], %r[[#DEST]];
; SM8X-NEXT: ret;
Expand Down
2 changes: 1 addition & 1 deletion libcudacxx/test/atomic_codegen/atomic_exch_non_volatile.cu
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ __global__ void exch_device_relaxed_non_volatile(int* data, int* out, int n)
; SM8X-DAG: ld.param.u64 %rd[[#ATOM:]], {{.*}}[[FUNCTION]]_param_0{{.*}}
; SM8X-DAG: ld.param.u64 %rd[[#EXPECTED:]], {{.*}}[[FUNCTION]]_param_1{{.*}}
; SM8X-DAG: ld.param.u32 %r[[#INPUT:]], {{.*}}[[FUNCTION]]_param_2{{.*}}
; SM8X-NEXT: cvta.to.global.u64 %rd[[#GOUT:]], %rd[[#EXPECTED]];
; SM8X-DAG: cvta.to.global.u64 %rd[[#GOUT:]], %rd[[#EXPECTED]];
; SM8X-NEXT: {{/*[[:space:]] *}}atom.exch.relaxed.gpu.b32 %r[[#DEST:]],[%rd[[#ATOM]]],%r[[#INPUT]];{{[[:space:]]/*}}
; SM8X-NEXT: st.global.u32 [%rd[[#GOUT]]], %r[[#DEST]];
; SM8X-NEXT: ret;
Expand Down
2 changes: 1 addition & 1 deletion libcudacxx/test/atomic_codegen/atomic_load_non_volatile.cu
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ __global__ void load_relaxed_device_non_volatile(int* data, int* out)
; SM8X: .visible .entry [[FUNCTION:_.*load_relaxed_device_non_volatile.*]](
; SM8X-DAG: ld.param.u64 %rd[[#ATOM:]], {{.*}}[[FUNCTION]]_param_0{{.*}}
; SM8X-DAG: ld.param.u64 %rd[[#EXPECTED:]], {{.*}}[[FUNCTION]]_param_1{{.*}}
; SM8X-NEXT: cvta.to.global.u64 %rd[[#GOUT:]], %rd[[#EXPECTED]];
; SM8X-DAG: cvta.to.global.u64 %rd[[#GOUT:]], %rd[[#EXPECTED]];
; SM8X-NEXT: {{/*[[:space:]] *}}ld.relaxed.gpu.b32 %r[[#DEST:]],[%rd[[#ATOM]]];{{[[:space:]]/*}}
; SM8X-NEXT: st.global.u32 [%rd[[#GOUT]]], %r[[#DEST]];
; SM8X-NEXT: ret;
Expand Down
2 changes: 1 addition & 1 deletion libcudacxx/test/atomic_codegen/atomic_sub_non_volatile.cu
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ __global__ void sub_relaxed_device_non_volatile(int* data, int* out, int n)
; SM8X-DAG: ld.param.u64 %rd[[#ATOM:]], {{.*}}[[FUNCTION]]_param_0{{.*}}
; SM8X-DAG: ld.param.u64 %rd[[#RESULT:]], {{.*}}[[FUNCTION]]_param_1{{.*}}
; SM8X-DAG: ld.param.u32 %r[[#INPUT:]], {{.*}}[[FUNCTION]]_param_2{{.*}}
; SM8X-NEXT: cvta.to.global.u64 %rd[[#GOUT:]], %rd[[#RESULT]];
; SM8X-DAG: cvta.to.global.u64 %rd[[#GOUT:]], %rd[[#RESULT]];
; SM8X-NEXT: neg.s32 %r[[#NEG:]], %r[[#INPUT]];
; SM8X-NEXT: {{/*[[:space:]] *}}atom.add.relaxed.gpu.s32 %r[[#DEST:]],[%rd[[#ATOM]]],%r[[#NEG]];{{[[:space:]]/*}}
; SM8X-NEXT: st.global.u32 [%rd[[#GOUT]]], %r[[#DEST]];
Expand Down

0 comments on commit 0479ebd

Please sign in to comment.