124 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -O0 -run-pass=legalizer %s -o - | FileCheck %s3# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -O0 -run-pass=legalizer %s -o - | FileCheck %s4 5---6name: atomic_cmpxchg_local_i327 8body: |9 bb.0:10 liveins: $sgpr0, $sgpr1, $sgpr211 ; CHECK-LABEL: name: atomic_cmpxchg_local_i3212 ; CHECK: liveins: $sgpr0, $sgpr1, $sgpr213 ; CHECK-NEXT: {{ $}}14 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $sgpr015 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr116 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $sgpr217 ; CHECK-NEXT: [[ATOMIC_CMPXCHG:%[0-9]+]]:_(s32) = G_ATOMIC_CMPXCHG [[COPY]](p3), [[COPY1]], [[COPY2]] :: (load store seq_cst (s32), addrspace 3)18 %0:_(p3) = COPY $sgpr019 %1:_(s32) = COPY $sgpr120 %2:_(s32) = COPY $sgpr221 %3:_(s32) = G_ATOMIC_CMPXCHG %0, %1, %2 :: (load store seq_cst (s32), addrspace 3)22...23 24---25name: atomic_cmpxchg_local_i6426 27body: |28 bb.0:29 liveins: $sgpr0, $sgpr1, $sgpr230 ; CHECK-LABEL: name: atomic_cmpxchg_local_i6431 ; CHECK: liveins: $sgpr0, $sgpr1, $sgpr232 ; CHECK-NEXT: {{ $}}33 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $sgpr034 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr135 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $sgpr236 ; CHECK-NEXT: [[ATOMIC_CMPXCHG:%[0-9]+]]:_(s32) = G_ATOMIC_CMPXCHG [[COPY]](p3), [[COPY1]], [[COPY2]] :: (load store seq_cst (s64), addrspace 3)37 %0:_(p3) = COPY $sgpr038 %1:_(s32) = COPY $sgpr139 %2:_(s32) = COPY $sgpr240 %3:_(s32) = G_ATOMIC_CMPXCHG %0, %1, %2 :: (load store seq_cst (s64), addrspace 3)41...42 43---44name: atomic_cmpxchg_global_i3245 46body: |47 bb.0:48 liveins: $sgpr0_sgpr1, $sgpr2, $sgpr349 ; CHECK-LABEL: name: atomic_cmpxchg_global_i3250 ; CHECK: liveins: $sgpr0_sgpr1, $sgpr2, $sgpr351 ; CHECK-NEXT: {{ $}}52 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $sgpr0_sgpr153 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr254 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $sgpr355 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[COPY2]](s32), [[COPY1]](s32)56 ; CHECK-NEXT: [[AMDGPU_ATOMIC_CMPXCHG:%[0-9]+]]:_(s32) = G_AMDGPU_ATOMIC_CMPXCHG [[COPY]](p1), [[BUILD_VECTOR]] :: (load store seq_cst (s32), addrspace 1)57 %0:_(p1) = COPY $sgpr0_sgpr158 %1:_(s32) = COPY $sgpr259 %2:_(s32) = COPY $sgpr360 %3:_(s32) = G_ATOMIC_CMPXCHG %0, %1, %2 :: (load store seq_cst (s32), addrspace 1)61...62 63---64name: atomic_cmpxchg_global_i6465 66body: |67 bb.0:68 liveins: $sgpr0_sgpr1, $sgpr2, $sgpr369 ; CHECK-LABEL: name: atomic_cmpxchg_global_i6470 ; CHECK: liveins: $sgpr0_sgpr1, $sgpr2, $sgpr371 ; CHECK-NEXT: {{ $}}72 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $sgpr0_sgpr173 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr274 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $sgpr375 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[COPY2]](s32), [[COPY1]](s32)76 ; CHECK-NEXT: [[AMDGPU_ATOMIC_CMPXCHG:%[0-9]+]]:_(s32) = G_AMDGPU_ATOMIC_CMPXCHG [[COPY]](p1), [[BUILD_VECTOR]] :: (load store seq_cst (s64), addrspace 1)77 %0:_(p1) = COPY $sgpr0_sgpr178 %1:_(s32) = COPY $sgpr279 %2:_(s32) = COPY $sgpr380 %3:_(s32) = G_ATOMIC_CMPXCHG %0, %1, %2 :: (load store seq_cst (s64), addrspace 1)81...82 83---84name: atomic_cmpxchg_flat_i3285 86body: |87 bb.0:88 liveins: $sgpr0_sgpr1, $sgpr2, $sgpr389 90 ; CHECK-LABEL: name: atomic_cmpxchg_flat_i3291 ; CHECK: liveins: $sgpr0_sgpr1, $sgpr2, $sgpr392 ; CHECK-NEXT: {{ $}}93 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $sgpr0_sgpr194 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr295 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $sgpr396 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[COPY2]](s32), [[COPY1]](s32)97 ; CHECK-NEXT: [[AMDGPU_ATOMIC_CMPXCHG:%[0-9]+]]:_(s32) = G_AMDGPU_ATOMIC_CMPXCHG [[COPY]](p0), [[BUILD_VECTOR]] :: (load store seq_cst (s32))98 %0:_(p0) = COPY $sgpr0_sgpr199 %1:_(s32) = COPY $sgpr2100 %2:_(s32) = COPY $sgpr3101 %3:_(s32) = G_ATOMIC_CMPXCHG %0, %1, %2 :: (load store seq_cst (s32), addrspace 0)102...103 104---105name: atomic_cmpxchg_flat_i64106 107body: |108 bb.0:109 liveins: $sgpr0_sgpr1, $sgpr2, $sgpr3110 111 ; CHECK-LABEL: name: atomic_cmpxchg_flat_i64112 ; CHECK: liveins: $sgpr0_sgpr1, $sgpr2, $sgpr3113 ; CHECK-NEXT: {{ $}}114 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $sgpr0_sgpr1115 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr2116 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $sgpr3117 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[COPY2]](s32), [[COPY1]](s32)118 ; CHECK-NEXT: [[AMDGPU_ATOMIC_CMPXCHG:%[0-9]+]]:_(s32) = G_AMDGPU_ATOMIC_CMPXCHG [[COPY]](p0), [[BUILD_VECTOR]] :: (load store seq_cst (s64))119 %0:_(p0) = COPY $sgpr0_sgpr1120 %1:_(s32) = COPY $sgpr2121 %2:_(s32) = COPY $sgpr3122 %3:_(s32) = G_ATOMIC_CMPXCHG %0, %1, %2 :: (load store seq_cst (s64), addrspace 0)123...124