246 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: sext_sgpr_s1_to_sgpr_s167legalized: true8regBankSelected: true9body: |10 bb.0:11 liveins: $sgpr012 13 ; GCN-LABEL: name: sext_sgpr_s1_to_sgpr_s1614 ; GCN: liveins: $sgpr015 ; GCN-NEXT: {{ $}}16 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr017 ; GCN-NEXT: [[S_BFE_I32_:%[0-9]+]]:sreg_32 = S_BFE_I32 [[COPY]], 65536, implicit-def $scc18 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 6553519 ; GCN-NEXT: [[S_AND_B32_:%[0-9]+]]:sreg_32 = S_AND_B32 [[S_MOV_B32_]], [[S_BFE_I32_]], implicit-def dead $scc20 ; GCN-NEXT: $sgpr0 = COPY [[S_AND_B32_]]21 %0:sgpr(s32) = COPY $sgpr022 %1:sgpr(s1) = G_TRUNC %023 %2:sgpr(s16) = G_SEXT %124 %3:sgpr(s32) = G_ZEXT %225 $sgpr0 = COPY %326...27 28---29 30name: sext_sgpr_s1_to_sgpr_s3231legalized: true32regBankSelected: true33body: |34 bb.0:35 liveins: $sgpr036 37 ; GCN-LABEL: name: sext_sgpr_s1_to_sgpr_s3238 ; GCN: liveins: $sgpr039 ; GCN-NEXT: {{ $}}40 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr041 ; GCN-NEXT: [[S_BFE_I32_:%[0-9]+]]:sreg_32 = S_BFE_I32 [[COPY]], 65536, implicit-def $scc42 ; GCN-NEXT: $sgpr0 = COPY [[S_BFE_I32_]]43 %0:sgpr(s32) = COPY $sgpr044 %1:sgpr(s1) = G_TRUNC %045 %2:sgpr(s32) = G_SEXT %146 $sgpr0 = COPY %247...48 49---50 51name: sext_sgpr_s1_to_sgpr_s6452legalized: true53regBankSelected: true54body: |55 bb.0:56 liveins: $sgpr057 58 ; GCN-LABEL: name: sext_sgpr_s1_to_sgpr_s6459 ; GCN: liveins: $sgpr060 ; GCN-NEXT: {{ $}}61 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr062 ; GCN-NEXT: [[DEF:%[0-9]+]]:sreg_32 = IMPLICIT_DEF63 ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[DEF]], %subreg.sub164 ; GCN-NEXT: [[S_BFE_I64_:%[0-9]+]]:sreg_64 = S_BFE_I64 [[REG_SEQUENCE]], 65536, implicit-def $scc65 ; GCN-NEXT: $sgpr0_sgpr1 = COPY [[S_BFE_I64_]]66 %0:sgpr(s32) = COPY $sgpr067 %1:sgpr(s1) = G_TRUNC %068 %2:sgpr(s64) = G_SEXT %169 $sgpr0_sgpr1 = COPY %270...71 72---73 74name: sext_sgpr_s16_to_sgpr_s3275legalized: true76regBankSelected: true77body: |78 bb.0:79 liveins: $sgpr080 81 ; GCN-LABEL: name: sext_sgpr_s16_to_sgpr_s3282 ; GCN: liveins: $sgpr083 ; GCN-NEXT: {{ $}}84 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr085 ; GCN-NEXT: [[S_SEXT_I32_I16_:%[0-9]+]]:sreg_32 = S_SEXT_I32_I16 [[COPY]]86 ; GCN-NEXT: $sgpr0 = COPY [[S_SEXT_I32_I16_]]87 %0:sgpr(s32) = COPY $sgpr088 %1:sgpr(s16) = G_TRUNC %089 %2:sgpr(s32) = G_SEXT %190 $sgpr0 = COPY %291 92...93 94---95 96name: sext_sgpr_s16_to_sgpr_s6497legalized: true98regBankSelected: true99body: |100 bb.0:101 liveins: $sgpr0102 103 ; GCN-LABEL: name: sext_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 = S_MOV_B32 31108 ; GCN-NEXT: [[S_SEXT_I32_I16_:%[0-9]+]]:sreg_32 = S_SEXT_I32_I16 [[COPY]]109 ; GCN-NEXT: [[S_ASHR_I32_:%[0-9]+]]:sreg_32 = S_ASHR_I32 [[S_SEXT_I32_I16_]], [[S_MOV_B32_]], implicit-def dead $scc110 ; GCN-NEXT: [[COPY1:%[0-9]+]]:sgpr_32 = COPY [[S_ASHR_I32_]]111 ; GCN-NEXT: [[S_SEXT_I32_I16_1:%[0-9]+]]:sreg_32_xexec_hi_and_sreg_32_xm0 = S_SEXT_I32_I16 [[COPY]]112 ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[S_SEXT_I32_I16_1]], %subreg.sub0, [[COPY1]], %subreg.sub1113 ; GCN-NEXT: $sgpr0_sgpr1 = COPY [[REG_SEQUENCE]]114 %0:sgpr(s32) = COPY $sgpr0115 %1:sgpr(s16) = G_TRUNC %0116 %2:sgpr(s64) = G_SEXT %1117 $sgpr0_sgpr1 = COPY %2118 119...120 121---122 123name: sext_sgpr_s32_to_sgpr_s64124legalized: true125regBankSelected: true126body: |127 bb.0:128 liveins: $sgpr0129 130 ; GCN-LABEL: name: sext_sgpr_s32_to_sgpr_s64131 ; GCN: liveins: $sgpr0132 ; GCN-NEXT: {{ $}}133 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32_xexec_hi_and_sreg_32_xm0 = COPY $sgpr0134 ; GCN-NEXT: [[S_ASHR_I32_:%[0-9]+]]:sreg_32 = S_ASHR_I32 [[COPY]], 31, implicit-def dead $scc135 ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_32_xm0 = COPY [[S_ASHR_I32_]]136 ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1137 ; GCN-NEXT: $sgpr0_sgpr1 = COPY [[REG_SEQUENCE]]138 %0:sgpr(s32) = COPY $sgpr0139 %1:sgpr(s64) = G_SEXT %0140 $sgpr0_sgpr1 = COPY %1141 142...143 144# ---145 146# name: sext_vcc_s1_to_vgpr_s32147# legalized: true148# regBankSelected: true149# body: |150# bb.0:151# liveins: $vgpr0152 153# %0:vgpr(s32) = COPY $vgpr0154# %1:vcc(s1) = G_ICMP intpred(eq), %0, %0155# %2:vgpr(s32) = G_SEXT %1156# $vgpr0 = COPY %2157# ...158 159---160 161name: sext_vgpr_s1_to_vgpr_s16162legalized: true163regBankSelected: true164body: |165 bb.0:166 liveins: $vgpr0167 168 ; GCN-LABEL: name: sext_vgpr_s1_to_vgpr_s16169 ; GCN: liveins: $vgpr0170 ; GCN-NEXT: {{ $}}171 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0172 ; GCN-NEXT: [[V_BFE_I32_e64_:%[0-9]+]]:vgpr_32 = V_BFE_I32_e64 [[COPY]], 0, 1, implicit $exec173 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 65535174 ; GCN-NEXT: [[V_AND_B32_e64_:%[0-9]+]]:vgpr_32 = V_AND_B32_e64 [[S_MOV_B32_]], [[V_BFE_I32_e64_]], implicit $exec175 ; GCN-NEXT: $vgpr0 = COPY [[V_AND_B32_e64_]]176 %0:vgpr(s32) = COPY $vgpr0177 %1:vgpr(s1) = G_TRUNC %0178 %2:vgpr(s16) = G_SEXT %1179 %3:vgpr(s32) = G_ZEXT %2180 $vgpr0 = COPY %3181...182 183---184 185name: sext_vgpr_s1_to_vgpr_s32186legalized: true187regBankSelected: true188body: |189 bb.0:190 liveins: $vgpr0191 192 ; GCN-LABEL: name: sext_vgpr_s1_to_vgpr_s32193 ; GCN: liveins: $vgpr0194 ; GCN-NEXT: {{ $}}195 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0196 ; GCN-NEXT: [[V_BFE_I32_e64_:%[0-9]+]]:vgpr_32 = V_BFE_I32_e64 [[COPY]], 0, 1, implicit $exec197 ; GCN-NEXT: $vgpr0 = COPY [[V_BFE_I32_e64_]]198 %0:vgpr(s32) = COPY $vgpr0199 %1:vgpr(s1) = G_TRUNC %0200 %2:vgpr(s32) = G_SEXT %1201 $vgpr0 = COPY %2202...203 204---205 206name: sext_vgpr_s16_to_vgpr_s32207legalized: true208regBankSelected: true209body: |210 bb.0:211 liveins: $vgpr0212 213 ; GCN-LABEL: name: sext_vgpr_s16_to_vgpr_s32214 ; GCN: liveins: $vgpr0215 ; GCN-NEXT: {{ $}}216 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0217 ; GCN-NEXT: [[V_BFE_I32_e64_:%[0-9]+]]:vgpr_32 = V_BFE_I32_e64 [[COPY]], 0, 16, implicit $exec218 ; GCN-NEXT: $vgpr0 = COPY [[V_BFE_I32_e64_]]219 %0:vgpr(s32) = COPY $vgpr0220 %1:vgpr(s16) = G_TRUNC %0221 %2:vgpr(s32) = G_SEXT %1222 $vgpr0 = COPY %2223 224...225 226---227 228name: sext_sgpr_reg_class_s1_to_sgpr_s32229legalized: true230regBankSelected: true231body: |232 bb.0:233 liveins: $sgpr0234 235 ; GCN-LABEL: name: sext_sgpr_reg_class_s1_to_sgpr_s32236 ; GCN: liveins: $sgpr0237 ; GCN-NEXT: {{ $}}238 ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0239 ; GCN-NEXT: [[S_BFE_I32_:%[0-9]+]]:sreg_32 = S_BFE_I32 [[COPY]], 65536, implicit-def $scc240 ; GCN-NEXT: $sgpr0 = COPY [[S_BFE_I32_]]241 %0:sgpr(s32) = COPY $sgpr0242 %1:sreg_32(s1) = G_TRUNC %0243 %2:sgpr(s32) = G_SEXT %1244 $sgpr0 = COPY %2245...246