brintos

brintos / llvm-project-archived public Read only

0
0
Text · 22.1 KiB · c8745e7 Raw
870 lines · plain
1# RUN: llc -mtriple arm-- -run-pass=legalizer %s -o - | FileCheck %s2# RUN: llc -mtriple thumb-- -mattr=+v6t2 -run-pass=legalizer %s -o - | FileCheck %s3--- |4  define void @test_add_s8() { ret void }5  define void @test_add_s16() { ret void }6  define void @test_add_s32() { ret void }7 8  define void @test_sub_s8() { ret void }9  define void @test_sub_s16() { ret void }10  define void @test_sub_s32() { ret void }11 12  define void @test_mul_s8() { ret void }13  define void @test_mul_s16() { ret void }14  define void @test_mul_s32() { ret void }15 16  define void @test_and_s8() { ret void }17  define void @test_and_s16() { ret void }18  define void @test_and_s32() { ret void }19  define void @test_and_s64() { ret void }20 21  define void @test_or_s8() { ret void }22  define void @test_or_s16() { ret void }23  define void @test_or_s32() { ret void }24  define void @test_or_s64() { ret void }25 26  define void @test_xor_s8() { ret void }27  define void @test_xor_s16() { ret void }28  define void @test_xor_s32() { ret void }29  define void @test_xor_s64() { ret void }30 31  define void @test_lshr_s32() { ret void }32  define void @test_ashr_s32() { ret void }33  define void @test_shl_s32() { ret void }34 35  define void @test_shift_s8() { ret void }36  define void @test_shift_s16() { ret void }37  define void @test_shift_amount_s8() { ret void }38  define void @test_shift_amount_s16() { ret void }39...40---41name:            test_add_s842# CHECK-LABEL: name: test_add_s843legalized:       false44# CHECK: legalized: true45regBankSelected: false46selected:        false47tracksRegLiveness: true48registers:49  - { id: 0, class: _ }50  - { id: 1, class: _ }51  - { id: 2, class: _ }52  - { id: 3, class: _ }53  - { id: 4, class: _ }54  - { id: 5, class: _ }55body:             |56  bb.0:57    liveins: $r0, $r158 59    %0(p0) = COPY $r060    %1(s8) = G_LOAD %0 :: (load (s8))61    %2(p0) = COPY $r062    %3(s8) = G_LOAD %2 :: (load (s8))63    %4(s8) = G_ADD %1, %364    ; G_ADD with s8 should widen65    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_ADD {{%[0-9]+, %[0-9]+}}66    ; CHECK: {{%[0-9]+}}:_(s32) = G_ADD {{%[0-9]+, %[0-9]+}}67    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_ADD {{%[0-9]+, %[0-9]+}}68    %5(s32) = G_SEXT %4(s8)69    $r0 = COPY %5(s32)70    BX_RET 14, $noreg, implicit $r071...72---73name:            test_add_s1674# CHECK-LABEL: name: test_add_s1675legalized:       false76# CHECK: legalized: true77regBankSelected: false78selected:        false79tracksRegLiveness: true80registers:81  - { id: 0, class: _ }82  - { id: 1, class: _ }83  - { id: 2, class: _ }84  - { id: 3, class: _ }85  - { id: 4, class: _ }86  - { id: 5, class: _ }87body:             |88  bb.0:89    liveins: $r0, $r190 91    %0(p0) = COPY $r092    %1(s16) = G_LOAD %0 :: (load (s16))93    %2(p0) = COPY $r094    %3(s16) = G_LOAD %2 :: (load (s16))95    %4(s16) = G_ADD %1, %396    ; G_ADD with s16 should widen97    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_ADD {{%[0-9]+, %[0-9]+}}98    ; CHECK: {{%[0-9]+}}:_(s32) = G_ADD {{%[0-9]+, %[0-9]+}}99    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_ADD {{%[0-9]+, %[0-9]+}}100    %5(s32) = G_SEXT %4(s16)101    $r0 = COPY %5(s32)102    BX_RET 14, $noreg, implicit $r0103...104---105name:            test_add_s32106# CHECK-LABEL: name: test_add_s32107legalized:       false108# CHECK: legalized: true109regBankSelected: false110selected:        false111tracksRegLiveness: true112registers:113  - { id: 0, class: _ }114  - { id: 1, class: _ }115  - { id: 2, class: _ }116body:             |117  bb.0:118    liveins: $r0, $r1119 120    %0(s32) = COPY $r0121    %1(s32) = COPY $r1122    %2(s32) = G_ADD %0, %1123    ; G_ADD with s32 is legal, so we should find it unchanged in the output124    ; CHECK: {{%[0-9]+}}:_(s32) = G_ADD {{%[0-9]+, %[0-9]+}}125    $r0 = COPY %2(s32)126    BX_RET 14, $noreg, implicit $r0127 128...129---130name:            test_sub_s8131# CHECK-LABEL: name: test_sub_s8132legalized:       false133# CHECK: legalized: true134regBankSelected: false135selected:        false136tracksRegLiveness: true137registers:138  - { id: 0, class: _ }139  - { id: 1, class: _ }140  - { id: 2, class: _ }141  - { id: 3, class: _ }142  - { id: 4, class: _ }143  - { id: 5, class: _ }144body:             |145  bb.0:146    liveins: $r0, $r1147 148    %0(p0) = COPY $r0149    %1(s8) = G_LOAD %0 :: (load (s8))150    %2(p0) = COPY $r0151    %3(s8) = G_LOAD %2 :: (load (s8))152    %4(s8) = G_SUB %1, %3153    ; G_SUB with s8 should widen154    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_SUB {{%[0-9]+, %[0-9]+}}155    ; CHECK: {{%[0-9]+}}:_(s32) = G_SUB {{%[0-9]+, %[0-9]+}}156    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_SUB {{%[0-9]+, %[0-9]+}}157    %5(s32) = G_SEXT %4(s8)158    $r0 = COPY %5(s32)159    BX_RET 14, $noreg, implicit $r0160...161---162name:            test_sub_s16163# CHECK-LABEL: name: test_sub_s16164legalized:       false165# CHECK: legalized: true166regBankSelected: false167selected:        false168tracksRegLiveness: true169registers:170  - { id: 0, class: _ }171  - { id: 1, class: _ }172  - { id: 2, class: _ }173  - { id: 3, class: _ }174  - { id: 4, class: _ }175  - { id: 5, class: _ }176body:             |177  bb.0:178    liveins: $r0, $r1179 180    %0(p0) = COPY $r0181    %1(s16) = G_LOAD %0 :: (load (s16))182    %2(p0) = COPY $r0183    %3(s16) = G_LOAD %2 :: (load (s16))184    %4(s16) = G_SUB %1, %3185    ; G_SUB with s16 should widen186    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_SUB {{%[0-9]+, %[0-9]+}}187    ; CHECK: {{%[0-9]+}}:_(s32) = G_SUB {{%[0-9]+, %[0-9]+}}188    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_SUB {{%[0-9]+, %[0-9]+}}189    %5(s32) = G_SEXT %4(s16)190    $r0 = COPY %5(s32)191    BX_RET 14, $noreg, implicit $r0192...193---194name:            test_sub_s32195# CHECK-LABEL: name: test_sub_s32196legalized:       false197# CHECK: legalized: true198regBankSelected: false199selected:        false200tracksRegLiveness: true201registers:202  - { id: 0, class: _ }203  - { id: 1, class: _ }204  - { id: 2, class: _ }205body:             |206  bb.0:207    liveins: $r0, $r1208 209    %0(s32) = COPY $r0210    %1(s32) = COPY $r1211    %2(s32) = G_SUB %0, %1212    ; G_SUB with s32 is legal, so we should find it unchanged in the output213    ; CHECK: {{%[0-9]+}}:_(s32) = G_SUB {{%[0-9]+, %[0-9]+}}214    $r0 = COPY %2(s32)215    BX_RET 14, $noreg, implicit $r0216 217...218---219name:            test_mul_s8220# CHECK-LABEL: name: test_mul_s8221legalized:       false222# CHECK: legalized: true223regBankSelected: false224selected:        false225tracksRegLiveness: true226registers:227  - { id: 0, class: _ }228  - { id: 1, class: _ }229  - { id: 2, class: _ }230  - { id: 3, class: _ }231  - { id: 4, class: _ }232  - { id: 5, class: _ }233body:             |234  bb.0:235    liveins: $r0, $r1236 237    %0(p0) = COPY $r0238    %1(s8) = G_LOAD %0 :: (load (s8))239    %2(p0) = COPY $r0240    %3(s8) = G_LOAD %2 :: (load (s8))241    %4(s8) = G_MUL %1, %3242    ; G_MUL with s8 should widen243    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_MUL {{%[0-9]+, %[0-9]+}}244    ; CHECK: {{%[0-9]+}}:_(s32) = G_MUL {{%[0-9]+, %[0-9]+}}245    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_MUL {{%[0-9]+, %[0-9]+}}246    %5(s32) = G_SEXT %4(s8)247    $r0 = COPY %5(s32)248    BX_RET 14, $noreg, implicit $r0249...250---251name:            test_mul_s16252# CHECK-LABEL: name: test_mul_s16253legalized:       false254# CHECK: legalized: true255regBankSelected: false256selected:        false257tracksRegLiveness: true258registers:259  - { id: 0, class: _ }260  - { id: 1, class: _ }261  - { id: 2, class: _ }262  - { id: 3, class: _ }263  - { id: 4, class: _ }264  - { id: 5, class: _ }265body:             |266  bb.0:267    liveins: $r0, $r1268 269    %0(p0) = COPY $r0270    %1(s16) = G_LOAD %0 :: (load (s16))271    %2(p0) = COPY $r0272    %3(s16) = G_LOAD %2 :: (load (s16))273    %4(s16) = G_MUL %1, %3274    ; G_MUL with s16 should widen275    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_MUL {{%[0-9]+, %[0-9]+}}276    ; CHECK: {{%[0-9]+}}:_(s32) = G_MUL {{%[0-9]+, %[0-9]+}}277    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_MUL {{%[0-9]+, %[0-9]+}}278    %5(s32) = G_SEXT %4(s16)279    $r0 = COPY %5(s32)280    BX_RET 14, $noreg, implicit $r0281...282---283name:            test_mul_s32284# CHECK-LABEL: name: test_mul_s32285legalized:       false286# CHECK: legalized: true287regBankSelected: false288selected:        false289tracksRegLiveness: true290registers:291  - { id: 0, class: _ }292  - { id: 1, class: _ }293  - { id: 2, class: _ }294body:             |295  bb.0:296    liveins: $r0, $r1297 298    %0(s32) = COPY $r0299    %1(s32) = COPY $r1300    %2(s32) = G_MUL %0, %1301    ; G_MUL with s32 is legal, so we should find it unchanged in the output302    ; CHECK: {{%[0-9]+}}:_(s32) = G_MUL {{%[0-9]+, %[0-9]+}}303    $r0 = COPY %2(s32)304    BX_RET 14, $noreg, implicit $r0305 306...307---308name:            test_and_s8309# CHECK-LABEL: name: test_and_s8310legalized:       false311# CHECK: legalized: true312regBankSelected: false313selected:        false314tracksRegLiveness: true315registers:316  - { id: 0, class: _ }317  - { id: 1, class: _ }318  - { id: 2, class: _ }319  - { id: 3, class: _ }320  - { id: 4, class: _ }321  - { id: 5, class: _ }322body:             |323  bb.0:324    liveins: $r0, $r1325 326    %0(p0) = COPY $r0327    %1(s8) = G_LOAD %0 :: (load (s8))328    %2(p0) = COPY $r0329    %3(s8) = G_LOAD %2 :: (load (s8))330    %4(s8) = G_AND %1, %3331    ; G_AND with s8 should widen332    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_AND {{%[0-9]+, %[0-9]+}}333    ; CHECK: {{%[0-9]+}}:_(s32) = G_AND {{%[0-9]+, %[0-9]+}}334    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_AND {{%[0-9]+, %[0-9]+}}335    %5(s32) = G_SEXT %4(s8)336    $r0 = COPY %5(s32)337    BX_RET 14, $noreg, implicit $r0338...339---340name:            test_and_s16341# CHECK-LABEL: name: test_and_s16342legalized:       false343# CHECK: legalized: true344regBankSelected: false345selected:        false346tracksRegLiveness: true347registers:348  - { id: 0, class: _ }349  - { id: 1, class: _ }350  - { id: 2, class: _ }351  - { id: 3, class: _ }352  - { id: 4, class: _ }353  - { id: 5, class: _ }354body:             |355  bb.0:356    liveins: $r0, $r1357 358    %0(p0) = COPY $r0359    %1(s16) = G_LOAD %0 :: (load (s16))360    %2(p0) = COPY $r0361    %3(s16) = G_LOAD %2 :: (load (s16))362    %4(s16) = G_AND %1, %3363    ; G_AND with s16 should widen364    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_AND {{%[0-9]+, %[0-9]+}}365    ; CHECK: {{%[0-9]+}}:_(s32) = G_AND {{%[0-9]+, %[0-9]+}}366    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_AND {{%[0-9]+, %[0-9]+}}367    %5(s32) = G_SEXT %4(s16)368    $r0 = COPY %5(s32)369    BX_RET 14, $noreg, implicit $r0370...371---372name:            test_and_s32373# CHECK-LABEL: name: test_and_s32374legalized:       false375# CHECK: legalized: true376regBankSelected: false377selected:        false378tracksRegLiveness: true379registers:380  - { id: 0, class: _ }381  - { id: 1, class: _ }382  - { id: 2, class: _ }383body:             |384  bb.0:385    liveins: $r0, $r1386 387    %0(s32) = COPY $r0388    %1(s32) = COPY $r1389    %2(s32) = G_AND %0, %1390    ; G_AND with s32 is legal, so we should find it unchanged in the output391    ; CHECK: {{%[0-9]+}}:_(s32) = G_AND {{%[0-9]+, %[0-9]+}}392    $r0 = COPY %2(s32)393    BX_RET 14, $noreg, implicit $r0394 395...396---397name:            test_and_s64398# CHECK-LABEL: name: test_and_s64399legalized:       false400# CHECK: legalized: true401regBankSelected: false402selected:        false403tracksRegLiveness: true404registers:405  - { id: 0, class: _ }406  - { id: 1, class: _ }407  - { id: 2, class: _ }408  - { id: 3, class: _ }409  - { id: 4, class: _ }410  - { id: 5, class: _ }411  - { id: 6, class: _ }412  - { id: 7, class: _ }413  - { id: 8, class: _ }414body:             |415  bb.0:416    liveins: $r0, $r1, $r2, $r3417 418    %0(s32) = COPY $r0419    %1(s32) = COPY $r1420    %2(s32) = COPY $r2421    %3(s32) = COPY $r3422    %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)423    %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)424    %6(s64) = G_AND %4, %5425    %7(s32), %8(s32) = G_UNMERGE_VALUES %6(s64)426    $r0 = COPY %7(s32)427    $r1 = COPY %8(s32)428    BX_RET 14, $noreg, implicit $r0, implicit $r1429 430...431---432name:            test_or_s8433# CHECK-LABEL: name: test_or_s8434legalized:       false435# CHECK: legalized: true436regBankSelected: false437selected:        false438tracksRegLiveness: true439registers:440  - { id: 0, class: _ }441  - { id: 1, class: _ }442  - { id: 2, class: _ }443  - { id: 3, class: _ }444  - { id: 4, class: _ }445  - { id: 5, class: _ }446body:             |447  bb.0:448    liveins: $r0, $r1449 450    %0(p0) = COPY $r0451    %1(s8) = G_LOAD %0 :: (load (s8))452    %2(p0) = COPY $r0453    %3(s8) = G_LOAD %2 :: (load (s8))454    %4(s8) = G_OR %1, %3455    ; G_OR with s8 should widen456    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_OR {{%[0-9]+, %[0-9]+}}457    ; CHECK: {{%[0-9]+}}:_(s32) = G_OR {{%[0-9]+, %[0-9]+}}458    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_OR {{%[0-9]+, %[0-9]+}}459    %5(s32) = G_SEXT %4(s8)460    $r0 = COPY %5(s32)461    BX_RET 14, $noreg, implicit $r0462...463---464name:            test_or_s16465# CHECK-LABEL: name: test_or_s16466legalized:       false467# CHECK: legalized: true468regBankSelected: false469selected:        false470tracksRegLiveness: true471registers:472  - { id: 0, class: _ }473  - { id: 1, class: _ }474  - { id: 2, class: _ }475  - { id: 3, class: _ }476  - { id: 4, class: _ }477  - { id: 5, class: _ }478body:             |479  bb.0:480    liveins: $r0, $r1481 482    %0(p0) = COPY $r0483    %1(s16) = G_LOAD %0 :: (load (s16))484    %2(p0) = COPY $r0485    %3(s16) = G_LOAD %2 :: (load (s16))486    %4(s16) = G_OR %1, %3487    ; G_OR with s16 should widen488    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_OR {{%[0-9]+, %[0-9]+}}489    ; CHECK: {{%[0-9]+}}:_(s32) = G_OR {{%[0-9]+, %[0-9]+}}490    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_OR {{%[0-9]+, %[0-9]+}}491    %5(s32) = G_SEXT %4(s16)492    $r0 = COPY %5(s32)493    BX_RET 14, $noreg, implicit $r0494...495---496name:            test_or_s32497# CHECK-LABEL: name: test_or_s32498legalized:       false499# CHECK: legalized: true500regBankSelected: false501selected:        false502tracksRegLiveness: true503registers:504  - { id: 0, class: _ }505  - { id: 1, class: _ }506  - { id: 2, class: _ }507body:             |508  bb.0:509    liveins: $r0, $r1510 511    %0(s32) = COPY $r0512    %1(s32) = COPY $r1513    %2(s32) = G_OR %0, %1514    ; G_OR with s32 is legal, so we should find it unchanged in the output515    ; CHECK: {{%[0-9]+}}:_(s32) = G_OR {{%[0-9]+, %[0-9]+}}516    $r0 = COPY %2(s32)517    BX_RET 14, $noreg, implicit $r0518 519...520---521name:            test_or_s64522# CHECK-LABEL: name: test_or_s64523legalized:       false524# CHECK: legalized: true525regBankSelected: false526selected:        false527tracksRegLiveness: true528registers:529  - { id: 0, class: _ }530  - { id: 1, class: _ }531  - { id: 2, class: _ }532  - { id: 3, class: _ }533  - { id: 4, class: _ }534  - { id: 5, class: _ }535  - { id: 6, class: _ }536  - { id: 7, class: _ }537  - { id: 8, class: _ }538body:             |539  bb.0:540    liveins: $r0, $r1, $r2, $r3541 542    %0(s32) = COPY $r0543    %1(s32) = COPY $r1544    %2(s32) = COPY $r2545    %3(s32) = COPY $r3546    %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)547    %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)548    %6(s64) = G_OR %4, %5549    %7(s32), %8(s32) = G_UNMERGE_VALUES %6(s64)550    $r0 = COPY %7(s32)551    $r1 = COPY %8(s32)552    BX_RET 14, $noreg, implicit $r0, implicit $r1553 554...555---556name:            test_xor_s8557# CHECK-LABEL: name: test_xor_s8558legalized:       false559# CHECK: legalized: true560regBankSelected: false561selected:        false562tracksRegLiveness: true563registers:564  - { id: 0, class: _ }565  - { id: 1, class: _ }566  - { id: 2, class: _ }567  - { id: 3, class: _ }568  - { id: 4, class: _ }569  - { id: 5, class: _ }570body:             |571  bb.0:572    liveins: $r0, $r1573 574    %0(p0) = COPY $r0575    %1(s8) = G_LOAD %0 :: (load (s8))576    %2(p0) = COPY $r0577    %3(s8) = G_LOAD %2 :: (load (s8))578    %4(s8) = G_XOR %1, %3579    ; G_XOR with s8 should widen580    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_XOR {{%[0-9]+, %[0-9]+}}581    ; CHECK: {{%[0-9]+}}:_(s32) = G_XOR {{%[0-9]+, %[0-9]+}}582    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_XOR {{%[0-9]+, %[0-9]+}}583    %5(s32) = G_SEXT %4(s8)584    $r0 = COPY %5(s32)585    BX_RET 14, $noreg, implicit $r0586...587---588name:            test_xor_s16589# CHECK-LABEL: name: test_xor_s16590legalized:       false591# CHECK: legalized: true592regBankSelected: false593selected:        false594tracksRegLiveness: true595registers:596  - { id: 0, class: _ }597  - { id: 1, class: _ }598  - { id: 2, class: _ }599  - { id: 3, class: _ }600  - { id: 4, class: _ }601  - { id: 5, class: _ }602body:             |603  bb.0:604    liveins: $r0, $r1605 606    %0(p0) = COPY $r0607    %1(s16) = G_LOAD %0 :: (load (s16))608    %2(p0) = COPY $r0609    %3(s16) = G_LOAD %2 :: (load (s16))610    %4(s16) = G_XOR %1, %3611    ; G_XOR with s16 should widen612    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_XOR {{%[0-9]+, %[0-9]+}}613    ; CHECK: {{%[0-9]+}}:_(s32) = G_XOR {{%[0-9]+, %[0-9]+}}614    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_XOR {{%[0-9]+, %[0-9]+}}615    %5(s32) = G_SEXT %4(s16)616    $r0 = COPY %5(s32)617    BX_RET 14, $noreg, implicit $r0618...619---620name:            test_xor_s32621# CHECK-LABEL: name: test_xor_s32622legalized:       false623# CHECK: legalized: true624regBankSelected: false625selected:        false626tracksRegLiveness: true627registers:628  - { id: 0, class: _ }629  - { id: 1, class: _ }630  - { id: 2, class: _ }631body:             |632  bb.0:633    liveins: $r0, $r1634 635    %0(s32) = COPY $r0636    %1(s32) = COPY $r1637    %2(s32) = G_XOR %0, %1638    ; G_XOR with s32 is legal, so we should find it unchanged in the output639    ; CHECK: {{%[0-9]+}}:_(s32) = G_XOR {{%[0-9]+, %[0-9]+}}640    $r0 = COPY %2(s32)641    BX_RET 14, $noreg, implicit $r0642 643...644---645name:            test_xor_s64646# CHECK-LABEL: name: test_xor_s64647legalized:       false648# CHECK: legalized: true649regBankSelected: false650selected:        false651tracksRegLiveness: true652registers:653  - { id: 0, class: _ }654  - { id: 1, class: _ }655  - { id: 2, class: _ }656  - { id: 3, class: _ }657  - { id: 4, class: _ }658  - { id: 5, class: _ }659  - { id: 6, class: _ }660  - { id: 7, class: _ }661  - { id: 8, class: _ }662body:             |663  bb.0:664    liveins: $r0, $r1, $r2, $r3665 666    %0(s32) = COPY $r0667    %1(s32) = COPY $r1668    %2(s32) = COPY $r2669    %3(s32) = COPY $r3670    %4(s64) = G_MERGE_VALUES %0(s32), %1(s32)671    %5(s64) = G_MERGE_VALUES %2(s32), %3(s32)672    %6(s64) = G_XOR %4, %5673    %7(s32), %8(s32) = G_UNMERGE_VALUES %6(s64)674    $r0 = COPY %7(s32)675    $r1 = COPY %8(s32)676    BX_RET 14, $noreg, implicit $r0, implicit $r1677 678...679---680name:            test_lshr_s32681# CHECK-LABEL: name: test_lshr_s32682legalized:       false683# CHECK: legalized: true684regBankSelected: false685selected:        false686tracksRegLiveness: true687registers:688  - { id: 0, class: _ }689  - { id: 1, class: _ }690  - { id: 2, class: _ }691body:             |692  bb.0:693    liveins: $r0, $r1694 695    %0(s32) = COPY $r0696    %1(s32) = COPY $r1697    %2(s32) = G_LSHR %0, %1698    ; G_LSHR with s32 is legal, so we should find it unchanged in the output699    ; CHECK: {{%[0-9]+}}:_(s32) = G_LSHR {{%[0-9]+, %[0-9]+}}700    $r0 = COPY %2(s32)701    BX_RET 14, $noreg, implicit $r0702 703...704---705name:            test_ashr_s32706# CHECK-LABEL: name: test_ashr_s32707legalized:       false708# CHECK: legalized: true709regBankSelected: false710selected:        false711tracksRegLiveness: true712registers:713  - { id: 0, class: _ }714  - { id: 1, class: _ }715  - { id: 2, class: _ }716body:             |717  bb.0:718    liveins: $r0, $r1719 720    %0(s32) = COPY $r0721    %1(s32) = COPY $r1722    %2(s32) = G_ASHR %0, %1723    ; G_ASHR with s32 is legal, so we should find it unchanged in the output724    ; CHECK: {{%[0-9]+}}:_(s32) = G_ASHR {{%[0-9]+, %[0-9]+}}725    $r0 = COPY %2(s32)726    BX_RET 14, $noreg, implicit $r0727 728...729---730name:            test_shl_s32731# CHECK-LABEL: name: test_shl_s32732legalized:       false733# CHECK: legalized: true734regBankSelected: false735selected:        false736tracksRegLiveness: true737registers:738  - { id: 0, class: _ }739  - { id: 1, class: _ }740  - { id: 2, class: _ }741body:             |742  bb.0:743    liveins: $r0, $r1744 745    %0(s32) = COPY $r0746    %1(s32) = COPY $r1747    %2(s32) = G_SHL %0, %1748    ; G_SHL with s32 is legal, so we should find it unchanged in the output749    ; CHECK: {{%[0-9]+}}:_(s32) = G_SHL {{%[0-9]+, %[0-9]+}}750    $r0 = COPY %2(s32)751    BX_RET 14, $noreg, implicit $r0752 753...754---755name:            test_shift_s8756# CHECK-LABEL: name: test_shift_s8757legalized:       false758# CHECK: legalized: true759regBankSelected: false760selected:        false761tracksRegLiveness: true762registers:763  - { id: 0, class: _ }764  - { id: 1, class: _ }765  - { id: 2, class: _ }766  - { id: 3, class: _ }767  - { id: 4, class: _ }768body:             |769  bb.0:770    liveins: $r0, $r1771 772    %0(s32) = COPY $r0773    %1(s32) = COPY $r1774    %2(s8) = G_TRUNC %0(s32)775    %3(s8) = G_SHL %2, %1(s32)776    ; G_SHL with s8 should widen777    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_SHL {{%[0-9]+, %[0-9]+}}778    ; CHECK: {{%[0-9]+}}:_(s32) = G_SHL {{%[0-9]+, %[0-9]+}}779    ; CHECK-NOT: {{%[0-9]+}}:_(s8) = G_SHL {{%[0-9]+, %[0-9]+}}780    %4(s32) = G_SEXT %3(s8)781    $r0 = COPY %4(s32)782    BX_RET 14, $noreg, implicit $r0783...784---785name:            test_shift_s16786# CHECK-LABEL: name: test_shift_s16787legalized:       false788# CHECK: legalized: true789regBankSelected: false790selected:        false791tracksRegLiveness: true792registers:793  - { id: 0, class: _ }794  - { id: 1, class: _ }795  - { id: 2, class: _ }796  - { id: 3, class: _ }797  - { id: 4, class: _ }798body:             |799  bb.0:800    liveins: $r0, $r1801 802    %0(s32) = COPY $r0803    %1(s32) = COPY $r1804    %2(s16) = G_TRUNC %0(s32)805    %3(s16) = G_SHL %2, %1(s32)806    ; G_SHL with s16 should widen807    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_SHL {{%[0-9]+, %[0-9]+}}808    ; CHECK: {{%[0-9]+}}:_(s32) = G_SHL {{%[0-9]+, %[0-9]+}}809    ; CHECK-NOT: {{%[0-9]+}}:_(s16) = G_SHL {{%[0-9]+, %[0-9]+}}810    %4(s32) = G_SEXT %3(s16)811    $r0 = COPY %4(s32)812    BX_RET 14, $noreg, implicit $r0813...814---815name:            test_shift_amount_s8816# CHECK-LABEL: name: test_shift_amount_s8817legalized:       false818# CHECK: legalized: true819regBankSelected: false820selected:        false821tracksRegLiveness: true822registers:823  - { id: 0, class: _ }824  - { id: 1, class: _ }825  - { id: 2, class: _ }826  - { id: 3, class: _ }827body:             |828  bb.0:829    liveins: $r0, $r1830 831    %0(s32) = COPY $r0832    %1(s32) = COPY $r1833    %2(s8) = G_TRUNC %0(s32)834    %3(s32) = G_SHL %1, %2(s8)835    ; G_SHL with s8 amount should widen836    ; CHECK-NOT: {{%[0-9]+}}:_(s32) = G_SHL {{%[0-9]+, %[0-9]+}}(s8)837    ; CHECK: {{%[0-9]+}}:_(s32) = G_SHL {{%[0-9]+, %[0-9]+}}(s32)838    ; CHECK-NOT: {{%[0-9]+}}:_(s32) = G_SHL {{%[0-9]+, %[0-9]+}}(s8)839    $r0 = COPY %3(s32)840    BX_RET 14, $noreg, implicit $r0841...842---843name:            test_shift_amount_s16844# CHECK-LABEL: name: test_shift_amount_s16845legalized:       false846# CHECK: legalized: true847regBankSelected: false848selected:        false849tracksRegLiveness: true850registers:851  - { id: 0, class: _ }852  - { id: 1, class: _ }853  - { id: 2, class: _ }854  - { id: 3, class: _ }855body:             |856  bb.0:857    liveins: $r0, $r1858 859    %0(s32) = COPY $r0860    %1(s32) = COPY $r1861    %2(s16) = G_TRUNC %0(s32)862    %3(s32) = G_SHL %1, %2(s16)863    ; G_SHL with s16 amount should widen864    ; CHECK-NOT: {{%[0-9]+}}:_(s32) = G_SHL {{%[0-9]+, %[0-9]+}}(s16)865    ; CHECK: {{%[0-9]+}}:_(s32) = G_SHL {{%[0-9]+, %[0-9]+}}(s32)866    ; CHECK-NOT: {{%[0-9]+}}:_(s32) = G_SHL {{%[0-9]+, %[0-9]+}}(s16)867    $r0 = COPY %3(s32)868    BX_RET 14, $noreg, implicit $r0869...870