1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s
6 name: cttz_zero_undef_s32_s
12 ; CHECK-LABEL: name: cttz_zero_undef_s32_s
13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
14 ; CHECK: [[CTTZ_ZERO_UNDEF:%[0-9]+]]:sgpr(s32) = G_CTTZ_ZERO_UNDEF [[COPY]](s32)
15 ; CHECK: S_ENDPGM 0, implicit [[CTTZ_ZERO_UNDEF]](s32)
16 %0:_(s32) = COPY $sgpr0
17 %1:_(s32) = G_CTTZ_ZERO_UNDEF %0
18 S_ENDPGM 0, implicit %1
22 name: cttz_zero_undef_s32_v
28 ; CHECK-LABEL: name: cttz_zero_undef_s32_v
29 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
30 ; CHECK: [[CTTZ_ZERO_UNDEF:%[0-9]+]]:vgpr(s32) = G_CTTZ_ZERO_UNDEF [[COPY]](s32)
31 ; CHECK: S_ENDPGM 0, implicit [[CTTZ_ZERO_UNDEF]](s32)
32 %0:_(s32) = COPY $vgpr0
33 %1:_(s32) = G_CTTZ_ZERO_UNDEF %0
34 S_ENDPGM 0, implicit %1
38 name: cttz_zero_undef_s64_s
44 ; CHECK-LABEL: name: cttz_zero_undef_s64_s
45 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
46 ; CHECK: [[CTTZ_ZERO_UNDEF:%[0-9]+]]:sgpr(s32) = G_CTTZ_ZERO_UNDEF [[COPY]](s64)
47 ; CHECK: S_ENDPGM 0, implicit [[CTTZ_ZERO_UNDEF]](s32)
48 %0:_(s64) = COPY $sgpr0_sgpr1
49 %1:_(s32) = G_CTTZ_ZERO_UNDEF %0
50 S_ENDPGM 0, implicit %1
54 name: cttz_zero_undef_s64_v
60 ; CHECK-LABEL: name: cttz_zero_undef_s64_v
61 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
62 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
63 ; CHECK: [[AMDGPU_FFBL_B32_:%[0-9]+]]:vgpr(s32) = G_AMDGPU_FFBL_B32 [[UV]](s32)
64 ; CHECK: [[AMDGPU_FFBL_B32_1:%[0-9]+]]:vgpr(s32) = G_AMDGPU_FFBL_B32 [[UV1]](s32)
65 ; CHECK: [[C:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 32
66 ; CHECK: [[ADD:%[0-9]+]]:vgpr(s32) = G_ADD [[AMDGPU_FFBL_B32_1]], [[C]]
67 ; CHECK: [[UMIN:%[0-9]+]]:vgpr(s32) = G_UMIN [[AMDGPU_FFBL_B32_]], [[ADD]]
68 ; CHECK: S_ENDPGM 0, implicit [[UMIN]](s32)
69 %0:_(s64) = COPY $vgpr0_vgpr1
70 %1:_(s32) = G_CTTZ_ZERO_UNDEF %0
71 S_ENDPGM 0, implicit %1