244 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=amdgcn -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s -check-prefixes=GCN3 4---5 6name: zext_sgpr_s1_to_sgpr_s167legalized: true8regBankSelected: true9body: |10 bb.0:11 liveins: $sgpr012 13 ; GCN-LABEL: name: zext_sgpr_s1_to_sgpr_s1614 ; GCN: liveins: $sgpr015 ; GCN-NEXT: {{ $}}16 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr017 ; GCN-NEXT: [[S_AND_B32_:%[0-9]+]]:sreg_32 = S_AND_B32 [[COPY]], 1, implicit-def dead $scc18 ; GCN-NEXT: [[S_SEXT_I32_I16_:%[0-9]+]]:sreg_32 = S_SEXT_I32_I16 [[S_AND_B32_]]19 ; GCN-NEXT: $sgpr0 = COPY [[S_SEXT_I32_I16_]]20 %0:sgpr(s32) = COPY $sgpr021 %1:sgpr(s1) = G_TRUNC %022 %2:sgpr(s16) = G_ZEXT %123 %3:sgpr(s32) = G_SEXT %224 $sgpr0 = COPY %325...26 27---28 29name: zext_sgpr_s1_to_sgpr_s3230legalized: true31regBankSelected: true32body: |33 bb.0:34 liveins: $sgpr035 36 ; GCN-LABEL: name: zext_sgpr_s1_to_sgpr_s3237 ; GCN: liveins: $sgpr038 ; GCN-NEXT: {{ $}}39 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr040 ; GCN-NEXT: [[S_AND_B32_:%[0-9]+]]:sreg_32 = S_AND_B32 [[COPY]], 1, implicit-def dead $scc41 ; GCN-NEXT: $sgpr0 = COPY [[S_AND_B32_]]42 %0:sgpr(s32) = COPY $sgpr043 %1:sgpr(s1) = G_TRUNC %044 %2:sgpr(s32) = G_ZEXT %145 $sgpr0 = COPY %246...47 48---49 50name: zext_sgpr_s1_to_sgpr_s6451legalized: true52regBankSelected: true53body: |54 bb.0:55 liveins: $sgpr056 57 ; GCN-LABEL: name: zext_sgpr_s1_to_sgpr_s6458 ; GCN: liveins: $sgpr059 ; GCN-NEXT: {{ $}}60 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr061 ; GCN-NEXT: [[DEF:%[0-9]+]]:sreg_32 = IMPLICIT_DEF62 ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[DEF]], %subreg.sub163 ; GCN-NEXT: [[S_BFE_U64_:%[0-9]+]]:sreg_64 = S_BFE_U64 [[REG_SEQUENCE]], 65536, implicit-def $scc64 ; GCN-NEXT: $sgpr0_sgpr1 = COPY [[S_BFE_U64_]]65 %0:sgpr(s32) = COPY $sgpr066 %1:sgpr(s1) = G_TRUNC %067 %2:sgpr(s64) = G_ZEXT %168 $sgpr0_sgpr1 = COPY %269...70 71---72 73name: zext_sgpr_s16_to_sgpr_s3274legalized: true75regBankSelected: true76body: |77 bb.0:78 liveins: $sgpr079 80 ; GCN-LABEL: name: zext_sgpr_s16_to_sgpr_s3281 ; GCN: liveins: $sgpr082 ; GCN-NEXT: {{ $}}83 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr084 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 6553585 ; GCN-NEXT: [[S_AND_B32_:%[0-9]+]]:sreg_32 = S_AND_B32 [[S_MOV_B32_]], [[COPY]], implicit-def dead $scc86 ; GCN-NEXT: $sgpr0 = COPY [[S_AND_B32_]]87 %0:sgpr(s32) = COPY $sgpr088 %1:sgpr(s16) = G_TRUNC %089 %2:sgpr(s32) = G_ZEXT %190 $sgpr0 = COPY %291 92...93 94---95 96name: zext_sgpr_s16_to_sgpr_s6497legalized: true98regBankSelected: true99body: |100 bb.0:101 liveins: $sgpr0102 103 ; GCN-LABEL: name: zext_sgpr_s16_to_sgpr_s64104 ; GCN: liveins: $sgpr0105 ; GCN-NEXT: {{ $}}106 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0107 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 0108 ; GCN-NEXT: [[S_MOV_B32_1:%[0-9]+]]:sreg_32 = S_MOV_B32 65535109 ; GCN-NEXT: [[S_AND_B32_:%[0-9]+]]:sreg_32 = S_AND_B32 [[COPY]], [[S_MOV_B32_1]], implicit-def dead $scc110 ; GCN-NEXT: [[COPY1:%[0-9]+]]:sgpr_32 = COPY [[S_AND_B32_]]111 ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, [[S_MOV_B32_]], %subreg.sub1112 ; GCN-NEXT: $sgpr0_sgpr1 = COPY [[REG_SEQUENCE]]113 %0:sgpr(s32) = COPY $sgpr0114 %1:sgpr(s16) = G_TRUNC %0115 %2:sgpr(s64) = G_ZEXT %1116 $sgpr0_sgpr1 = COPY %2117 118...119 120---121 122name: zext_sgpr_s32_to_sgpr_s64123legalized: true124regBankSelected: true125body: |126 bb.0:127 liveins: $sgpr0128 129 ; GCN-LABEL: name: zext_sgpr_s32_to_sgpr_s64130 ; GCN: liveins: $sgpr0131 ; GCN-NEXT: {{ $}}132 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32_xexec_hi_and_sreg_32_xm0 = COPY $sgpr0133 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 0134 ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[S_MOV_B32_]], %subreg.sub1135 ; GCN-NEXT: $sgpr0_sgpr1 = COPY [[REG_SEQUENCE]]136 %0:sgpr(s32) = COPY $sgpr0137 %1:sgpr(s64) = G_ZEXT %0138 $sgpr0_sgpr1 = COPY %1139 140...141 142# ---143 144# name: zext_vcc_s1_to_vgpr_s32145# legalized: true146# regBankSelected: true147# body: |148# bb.0:149# liveins: $vgpr0150 151# %0:vgpr(s32) = COPY $vgpr0152# %1:vcc(s1) = G_ICMP intpred(eq), %0, %0153# %2:vgpr(s32) = G_ZEXT %1154# $vgpr0 = COPY %2155# ...156 157---158 159name: zext_vgpr_s1_to_vgpr_s16160legalized: true161regBankSelected: true162body: |163 bb.0:164 liveins: $vgpr0165 166 ; GCN-LABEL: name: zext_vgpr_s1_to_vgpr_s16167 ; GCN: liveins: $vgpr0168 ; GCN-NEXT: {{ $}}169 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0170 ; GCN-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY]], implicit $exec171 ; GCN-NEXT: [[V_BFE_I32_e64_:%[0-9]+]]:vgpr_32 = V_BFE_I32_e64 [[V_AND_B32_e32_]], 0, 16, implicit $exec172 ; GCN-NEXT: $vgpr0 = COPY [[V_BFE_I32_e64_]]173 %0:vgpr(s32) = COPY $vgpr0174 %1:vgpr(s1) = G_TRUNC %0175 %2:vgpr(s16) = G_ZEXT %1176 %3:vgpr(s32) = G_SEXT %2177 $vgpr0 = COPY %3178...179 180---181 182name: zext_vgpr_s1_to_vgpr_s32183legalized: true184regBankSelected: true185body: |186 bb.0:187 liveins: $vgpr0188 189 ; GCN-LABEL: name: zext_vgpr_s1_to_vgpr_s32190 ; GCN: liveins: $vgpr0191 ; GCN-NEXT: {{ $}}192 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0193 ; GCN-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY]], implicit $exec194 ; GCN-NEXT: $vgpr0 = COPY [[V_AND_B32_e32_]]195 %0:vgpr(s32) = COPY $vgpr0196 %1:vgpr(s1) = G_TRUNC %0197 %2:vgpr(s32) = G_ZEXT %1198 $vgpr0 = COPY %2199...200 201---202 203name: zext_vgpr_s16_to_vgpr_s32204legalized: true205regBankSelected: true206body: |207 bb.0:208 liveins: $vgpr0209 210 ; GCN-LABEL: name: zext_vgpr_s16_to_vgpr_s32211 ; GCN: liveins: $vgpr0212 ; GCN-NEXT: {{ $}}213 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0214 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 65535215 ; GCN-NEXT: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[S_MOV_B32_]], [[COPY]], implicit $exec216 ; GCN-NEXT: $vgpr0 = COPY [[V_AND_B32_e64_]]217 %0:vgpr(s32) = COPY $vgpr0218 %1:vgpr(s16) = G_TRUNC %0219 %2:vgpr(s32) = G_ZEXT %1220 $vgpr0 = COPY %2221 222...223 224---225 226name: zext_sgpr_reg_class_s1_to_sgpr_s32227legalized: true228regBankSelected: true229body: |230 bb.0:231 liveins: $sgpr0232 233 ; GCN-LABEL: name: zext_sgpr_reg_class_s1_to_sgpr_s32234 ; GCN: liveins: $sgpr0235 ; GCN-NEXT: {{ $}}236 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0237 ; GCN-NEXT: [[S_AND_B32_:%[0-9]+]]:sreg_32 = S_AND_B32 [[COPY]], 1, implicit-def dead $scc238 ; GCN-NEXT: $sgpr0 = COPY [[S_AND_B32_]]239 %0:sgpr(s32) = COPY $sgpr0240 %1:sreg_32(s1) = G_TRUNC %0241 %2:sgpr(s32) = G_ZEXT %1242 $sgpr0 = COPY %2243...244