1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=GCN
6 name: anyext_scc_s1_to_sgpr_s32
13 ; GCN-LABEL: name: anyext_scc_s1_to_sgpr_s32
14 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
15 ; GCN: S_CMP_EQ_U32 [[COPY]], [[COPY]], implicit-def $scc
16 ; GCN: [[COPY1:%[0-9]+]]:sreg_32 = COPY $scc
17 ; GCN: $scc = COPY [[COPY1]]
18 ; GCN: [[S_CSELECT_B32_:%[0-9]+]]:sreg_32 = S_CSELECT_B32 0, 1, implicit $scc
19 ; GCN: $sgpr0 = COPY [[S_CSELECT_B32_]]
20 %0:sgpr(s32) = COPY $sgpr0
21 %1:scc(s1) = G_ICMP intpred(eq), %0, %0
22 %2:sgpr(s32) = G_ANYEXT %1
28 name: anyext_scc_s1_to_sgpr_s64
35 ; GCN-LABEL: name: anyext_scc_s1_to_sgpr_s64
36 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
37 ; GCN: S_CMP_EQ_U32 [[COPY]], [[COPY]], implicit-def $scc
38 ; GCN: [[COPY1:%[0-9]+]]:sreg_32 = COPY $scc
39 ; GCN: $scc = COPY [[COPY1]]
40 ; GCN: [[S_CSELECT_B64_:%[0-9]+]]:sreg_64_xexec = S_CSELECT_B64 0, 1, implicit $scc
41 ; GCN: $sgpr0_sgpr1 = COPY [[S_CSELECT_B64_]]
42 %0:sgpr(s32) = COPY $sgpr0
43 %1:scc(s1) = G_ICMP intpred(eq), %0, %0
44 %2:sgpr(s64) = G_ANYEXT %1
45 $sgpr0_sgpr1 = COPY %2
50 name: anyext_sgpr_s1_to_sgpr_s32
57 ; GCN-LABEL: name: anyext_sgpr_s1_to_sgpr_s32
58 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
59 ; GCN: $sgpr0 = COPY [[COPY]]
60 %0:sgpr(s32) = COPY $sgpr0
61 %1:sgpr(s1) = G_TRUNC %0
62 %2:sgpr(s32) = G_ANYEXT %1
68 name: anyext_sgpr_s1_to_sgpr_s64
75 ; GCN-LABEL: name: anyext_sgpr_s1_to_sgpr_s64
76 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
77 ; GCN: [[COPY1:%[0-9]+]]:sreg_64_xexec = COPY [[COPY]]
78 ; GCN: $sgpr0_sgpr1 = COPY [[COPY1]]
79 %0:sgpr(s32) = COPY $sgpr0
80 %1:sgpr(s1) = G_TRUNC %0
81 %2:sgpr(s64) = G_ANYEXT %1
82 $sgpr0_sgpr1 = COPY %2
87 name: anyext_sgpr_s8_to_sgpr_s32
94 ; GCN-LABEL: name: anyext_sgpr_s8_to_sgpr_s32
95 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
96 ; GCN: $sgpr0 = COPY [[COPY]]
97 %0:sgpr(s32) = COPY $sgpr0
98 %1:sgpr(s8) = G_TRUNC %0
99 %2:sgpr(s32) = G_ANYEXT %1
106 name: anyext_sgpr_s16_to_sgpr_s32
108 regBankSelected: true
113 ; GCN-LABEL: name: anyext_sgpr_s16_to_sgpr_s32
114 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
115 ; GCN: $sgpr0 = COPY [[COPY]]
116 %0:sgpr(s32) = COPY $sgpr0
117 %1:sgpr(s16) = G_TRUNC %0
118 %2:sgpr(s32) = G_ANYEXT %1
125 name: anyext_sgpr_s16_to_sgpr_s64
127 regBankSelected: true
132 ; GCN-LABEL: name: anyext_sgpr_s16_to_sgpr_s64
133 ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
134 ; GCN: [[COPY1:%[0-9]+]]:sreg_64_xexec = COPY [[COPY]]
135 ; GCN: $sgpr0_sgpr1 = COPY [[COPY1]]
136 %0:sgpr(s32) = COPY $sgpr0
137 %1:sgpr(s16) = G_TRUNC %0
138 %2:sgpr(s64) = G_ANYEXT %1
139 $sgpr0_sgpr1 = COPY %2
145 name: anyext_vcc_s1_to_vgpr_s32
147 regBankSelected: true
152 ; GCN-LABEL: name: anyext_vcc_s1_to_vgpr_s32
153 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
154 ; GCN: [[V_CMP_EQ_U32_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U32_e64 [[COPY]], [[COPY]], implicit $exec
155 ; GCN: [[V_CNDMASK_B32_e64_:%[0-9]+]]:vgpr_32 = V_CNDMASK_B32_e64 0, 0, 0, 1, [[V_CMP_EQ_U32_e64_]], implicit $exec
156 ; GCN: $vgpr0 = COPY [[V_CNDMASK_B32_e64_]]
157 %0:vgpr(s32) = COPY $vgpr0
158 %1:vcc(s1) = G_ICMP intpred(eq), %0, %0
159 %2:vgpr(s32) = G_ANYEXT %1
165 name: anyext_vgpr_s1_to_vgpr_s32
167 regBankSelected: true
172 ; GCN-LABEL: name: anyext_vgpr_s1_to_vgpr_s32
173 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
174 ; GCN: $vgpr0 = COPY [[COPY]]
175 %0:vgpr(s32) = COPY $vgpr0
176 %1:vgpr(s1) = G_TRUNC %0
177 %2:vgpr(s32) = G_ANYEXT %1
183 name: anyext_vgpr_s8_to_vgpr_s32
185 regBankSelected: true
190 ; GCN-LABEL: name: anyext_vgpr_s8_to_vgpr_s32
191 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
192 ; GCN: $vgpr0 = COPY [[COPY]]
193 %0:vgpr(s32) = COPY $vgpr0
194 %1:vgpr(s8) = G_TRUNC %0
195 %2:vgpr(s32) = G_ANYEXT %1
202 name: anyext_vgpr_s16_to_vgpr_s32
204 regBankSelected: true
209 ; GCN-LABEL: name: anyext_vgpr_s16_to_vgpr_s32
210 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
211 ; GCN: $vgpr0 = COPY [[COPY]]
212 %0:vgpr(s32) = COPY $vgpr0
213 %1:vgpr(s16) = G_TRUNC %0
214 %2:vgpr(s32) = G_ANYEXT %1