1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=WAVE32 %s
3 # RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=WAVE64 %s
5 # RUN: llc -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=2 -pass-remarks-missed='gisel*' %s -o /dev/null 2>&1 | FileCheck -check-prefix=SI-ERR %s
8 # SI-ERR: remark: <unknown>:0:0: cannot select: %3:vcc(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.class), %2:sgpr(s16), %1:vgpr(s32) (in function: class_s16_vcc_sv)
9 # SI-ERR-NEXT: remark: <unknown>:0:0: cannot select: %3:vcc(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.class), %2:vgpr(s16), %1:sgpr(s32) (in function: class_s16_vcc_vs)
10 # SI-ERR-NEXT: remark: <unknown>:0:0: cannot select: %3:vcc(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.class), %2:vgpr(s16), %1:vgpr(s32) (in function: class_s16_vcc_vv)
14 name: class_s16_vcc_sv
17 tracksRegLiveness: true
21 liveins: $sgpr0, $vgpr0
22 ; WAVE32-LABEL: name: class_s16_vcc_sv
23 ; WAVE32: liveins: $sgpr0, $vgpr0
24 ; WAVE32: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
25 ; WAVE32: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
26 ; WAVE32: [[V_CMP_CLASS_F16_e64_:%[0-9]+]]:sreg_64 = V_CMP_CLASS_F16_e64 0, [[COPY]], [[COPY1]], implicit $exec
27 ; WAVE32: S_ENDPGM 0, implicit [[V_CMP_CLASS_F16_e64_]]
28 ; WAVE64-LABEL: name: class_s16_vcc_sv
29 ; WAVE64: liveins: $sgpr0, $vgpr0
30 ; WAVE64: $vcc_hi = IMPLICIT_DEF
31 ; WAVE64: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
32 ; WAVE64: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
33 ; WAVE64: [[V_CMP_CLASS_F16_e64_:%[0-9]+]]:sreg_32 = V_CMP_CLASS_F16_e64 0, [[COPY]], [[COPY1]], implicit $exec
34 ; WAVE64: S_ENDPGM 0, implicit [[V_CMP_CLASS_F16_e64_]]
35 %0:sgpr(s32) = COPY $sgpr0
36 %1:vgpr(s32) = COPY $vgpr0
37 %2:sgpr(s16) = G_TRUNC %0
38 %4:vcc(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.class), %2, %1
39 S_ENDPGM 0, implicit %4
43 name: class_s16_vcc_vs
46 tracksRegLiveness: true
50 liveins: $sgpr0, $vgpr0
51 ; WAVE32-LABEL: name: class_s16_vcc_vs
52 ; WAVE32: liveins: $sgpr0, $vgpr0
53 ; WAVE32: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
54 ; WAVE32: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
55 ; WAVE32: [[V_CMP_CLASS_F16_e64_:%[0-9]+]]:sreg_64 = V_CMP_CLASS_F16_e64 0, [[COPY]], [[COPY1]], implicit $exec
56 ; WAVE32: S_ENDPGM 0, implicit [[V_CMP_CLASS_F16_e64_]]
57 ; WAVE64-LABEL: name: class_s16_vcc_vs
58 ; WAVE64: liveins: $sgpr0, $vgpr0
59 ; WAVE64: $vcc_hi = IMPLICIT_DEF
60 ; WAVE64: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
61 ; WAVE64: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
62 ; WAVE64: [[V_CMP_CLASS_F16_e64_:%[0-9]+]]:sreg_32 = V_CMP_CLASS_F16_e64 0, [[COPY]], [[COPY1]], implicit $exec
63 ; WAVE64: S_ENDPGM 0, implicit [[V_CMP_CLASS_F16_e64_]]
64 %0:vgpr(s32) = COPY $vgpr0
65 %1:sgpr(s32) = COPY $sgpr0
66 %2:vgpr(s16) = G_TRUNC %0
67 %4:vcc(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.class), %2, %1
68 S_ENDPGM 0, implicit %4
72 name: class_s16_vcc_vv
75 tracksRegLiveness: true
79 liveins: $vgpr0, $vgpr1
80 ; WAVE32-LABEL: name: class_s16_vcc_vv
81 ; WAVE32: liveins: $vgpr0, $vgpr1
82 ; WAVE32: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
83 ; WAVE32: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
84 ; WAVE32: [[V_CMP_CLASS_F16_e64_:%[0-9]+]]:sreg_64 = V_CMP_CLASS_F16_e64 0, [[COPY]], [[COPY1]], implicit $exec
85 ; WAVE32: S_ENDPGM 0, implicit [[V_CMP_CLASS_F16_e64_]]
86 ; WAVE64-LABEL: name: class_s16_vcc_vv
87 ; WAVE64: liveins: $vgpr0, $vgpr1
88 ; WAVE64: $vcc_hi = IMPLICIT_DEF
89 ; WAVE64: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
90 ; WAVE64: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
91 ; WAVE64: [[V_CMP_CLASS_F16_e64_:%[0-9]+]]:sreg_32 = V_CMP_CLASS_F16_e64 0, [[COPY]], [[COPY1]], implicit $exec
92 ; WAVE64: S_ENDPGM 0, implicit [[V_CMP_CLASS_F16_e64_]]
93 %0:vgpr(s32) = COPY $vgpr0
94 %1:vgpr(s32) = COPY $vgpr1
95 %2:vgpr(s16) = G_TRUNC %0
96 %4:vcc(s1) = G_INTRINSIC intrinsic(@llvm.amdgcn.class), %2, %1
97 S_ENDPGM 0, implicit %4