brintos

brintos / llvm-project-archived public Read only

0
0
Text · 12.6 KiB · 6292381 Raw
411 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -o - -mtriple=aarch64-unknown-unknown -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs  %s | FileCheck %s3---4name:            test_combine_anyext_trunc5body:             |6  bb.1:7  liveins: $x08    ; CHECK-LABEL: name: test_combine_anyext_trunc9    ; CHECK: liveins: $x010    ; CHECK-NEXT: {{  $}}11    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x012    ; CHECK-NEXT: $x1 = COPY [[COPY]](s64)13    %0:_(s64) = COPY $x014    %1:_(s32) = G_TRUNC %0(s64)15    %2:_(s64) = G_ANYEXT %1(s32)16    $x1 = COPY %2(s64)17...18---19name:            test_combine_anyext_trunc_with_hint20body:             |21  bb.1:22  liveins: $x023    ; CHECK-LABEL: name: test_combine_anyext_trunc_with_hint24    ; CHECK: liveins: $x025    ; CHECK-NEXT: {{  $}}26    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x027    ; CHECK-NEXT: $x1 = COPY [[COPY]](s64)28    %0:_(s64) = COPY $x029    %1:_(s32) = G_TRUNC %0(s64)30    %2:_(s32) = G_ASSERT_ZEXT %1(s32), 1131    %3:_(s64) = G_ANYEXT %2(s32)32    $x1 = COPY %3(s64)33...34---35name:            test_combine_anyext_trunc_vec36body:             |37  bb.1:38  liveins: $q039    ; CHECK-LABEL: name: test_combine_anyext_trunc_vec40    ; CHECK: liveins: $q041    ; CHECK-NEXT: {{  $}}42    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q043    ; CHECK-NEXT: $q0 = COPY [[COPY]](<2 x s64>)44    %0:_(<2 x s64>) = COPY $q045    %1:_(<2 x s32>) = G_TRUNC %0(<2 x s64>)46    %2:_(<2 x s64>) = G_ANYEXT %1(<2 x s32>)47    $q0 = COPY %2(<2 x s64>)48...49---50name:            test_combine_anyext_anyext51body:             |52  bb.1:53  liveins: $h054    ; CHECK-LABEL: name: test_combine_anyext_anyext55    ; CHECK: liveins: $h056    ; CHECK-NEXT: {{  $}}57    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h058    ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[COPY]](s16)59    ; CHECK-NEXT: $x0 = COPY [[ANYEXT]](s64)60    %0:_(s16) = COPY $h061    %1:_(s32) = G_ANYEXT %0(s16)62    %2:_(s64) = G_ANYEXT %1(s32)63    $x0 = COPY %2(s64)64...65---66name:            test_combine_anyext_anyext_with_hint67body:             |68  bb.1:69  liveins: $h070    ; CHECK-LABEL: name: test_combine_anyext_anyext_with_hint71    ; CHECK: liveins: $h072    ; CHECK-NEXT: {{  $}}73    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h074    ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[COPY]](s16)75    ; CHECK-NEXT: $x0 = COPY [[ANYEXT]](s64)76    %0:_(s16) = COPY $h077    %1:_(s32) = G_ANYEXT %0(s16)78    %2:_(s32) = G_ASSERT_ZEXT %1(s32), 1179    %3:_(s64) = G_ANYEXT %2(s32)80    $x0 = COPY %3(s64)81...82---83name:            test_combine_anyext_anyext_vec84body:             |85  bb.1:86  liveins: $s087    ; CHECK-LABEL: name: test_combine_anyext_anyext_vec88    ; CHECK: liveins: $s089    ; CHECK-NEXT: {{  $}}90    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $s091    ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(<2 x s64>) = G_ANYEXT [[COPY]](<2 x s16>)92    ; CHECK-NEXT: $q0 = COPY [[ANYEXT]](<2 x s64>)93    %0:_(<2 x s16>) = COPY $s094    %1:_(<2 x s32>) = G_ANYEXT %0(<2 x s16>)95    %2:_(<2 x s64>) = G_ANYEXT %1(<2 x s32>)96    $q0 = COPY %2(<2 x s64>)97...98---99name:            test_combine_anyext_sext100body:             |101  bb.1:102  liveins: $h0103    ; CHECK-LABEL: name: test_combine_anyext_sext104    ; CHECK: liveins: $h0105    ; CHECK-NEXT: {{  $}}106    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0107    ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[COPY]](s16)108    ; CHECK-NEXT: $x0 = COPY [[SEXT]](s64)109    %0:_(s16) = COPY $h0110    %1:_(s32) = G_SEXT %0(s16)111    %2:_(s64) = G_ANYEXT %1(s32)112    $x0 = COPY %2(s64)113...114---115name:            test_combine_anyext_sext_with_hint116body:             |117  bb.1:118  liveins: $h0119    ; CHECK-LABEL: name: test_combine_anyext_sext_with_hint120    ; CHECK: liveins: $h0121    ; CHECK-NEXT: {{  $}}122    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0123    ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[COPY]](s16)124    ; CHECK-NEXT: $x0 = COPY [[SEXT]](s64)125    %0:_(s16) = COPY $h0126    %1:_(s32) = G_SEXT %0(s16)127    %2:_(s32) = G_ASSERT_ZEXT %1(s32), 11128    %3:_(s64) = G_ANYEXT %2(s32)129    $x0 = COPY %3(s64)130...131---132name:            test_combine_anyext_sext_vec133body:             |134  bb.1:135  liveins: $s0136    ; CHECK-LABEL: name: test_combine_anyext_sext_vec137    ; CHECK: liveins: $s0138    ; CHECK-NEXT: {{  $}}139    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $s0140    ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(<2 x s64>) = G_SEXT [[COPY]](<2 x s16>)141    ; CHECK-NEXT: $q0 = COPY [[SEXT]](<2 x s64>)142    %0:_(<2 x s16>) = COPY $s0143    %1:_(<2 x s32>) = G_SEXT %0(<2 x s16>)144    %2:_(<2 x s64>) = G_ANYEXT %1(<2 x s32>)145    $q0 = COPY %2(<2 x s64>)146...147---148name:            test_combine_anyext_zext149body:             |150  bb.1:151  liveins: $h0152    ; CHECK-LABEL: name: test_combine_anyext_zext153    ; CHECK: liveins: $h0154    ; CHECK-NEXT: {{  $}}155    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0156    ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY]](s16)157    ; CHECK-NEXT: $x0 = COPY [[ZEXT]](s64)158    %0:_(s16) = COPY $h0159    %1:_(s32) = G_ZEXT %0(s16)160    %2:_(s64) = G_ANYEXT %1(s32)161    $x0 = COPY %2(s64)162...163---164name:            test_combine_anyext_zext_with_hint165body:             |166  bb.1:167  liveins: $h0168    ; CHECK-LABEL: name: test_combine_anyext_zext_with_hint169    ; CHECK: liveins: $h0170    ; CHECK-NEXT: {{  $}}171    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0172    ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY]](s16)173    ; CHECK-NEXT: $x0 = COPY [[ZEXT]](s64)174    %0:_(s16) = COPY $h0175    %1:_(s32) = G_ZEXT %0(s16)176    %2:_(s32) = G_ASSERT_ZEXT %1(s32), 11177    %3:_(s64) = G_ANYEXT %2(s32)178    $x0 = COPY %3(s64)179...180---181name:            test_combine_anyext_zext_vec182body:             |183  bb.1:184  liveins: $s0185    ; CHECK-LABEL: name: test_combine_anyext_zext_vec186    ; CHECK: liveins: $s0187    ; CHECK-NEXT: {{  $}}188    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $s0189    ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(<2 x s64>) = G_ZEXT [[COPY]](<2 x s16>)190    ; CHECK-NEXT: $q0 = COPY [[ZEXT]](<2 x s64>)191    %0:_(<2 x s16>) = COPY $s0192    %1:_(<2 x s32>) = G_ZEXT %0(<2 x s16>)193    %2:_(<2 x s64>) = G_ANYEXT %1(<2 x s32>)194    $q0 = COPY %2(<2 x s64>)195...196---197name:            test_combine_sext_sext198body:             |199  bb.1:200  liveins: $h0201    ; CHECK-LABEL: name: test_combine_sext_sext202    ; CHECK: liveins: $h0203    ; CHECK-NEXT: {{  $}}204    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0205    ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[COPY]](s16)206    ; CHECK-NEXT: $x0 = COPY [[SEXT]](s64)207    %0:_(s16) = COPY $h0208    %1:_(s32) = G_SEXT %0(s16)209    %2:_(s64) = G_SEXT %1(s32)210    $x0 = COPY %2(s64)211...212---213name:            test_combine_sext_sext_with_hint214body:             |215  bb.1:216  liveins: $h0217    ; CHECK-LABEL: name: test_combine_sext_sext_with_hint218    ; CHECK: liveins: $h0219    ; CHECK-NEXT: {{  $}}220    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0221    ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[COPY]](s16)222    ; CHECK-NEXT: $x0 = COPY [[SEXT]](s64)223    %0:_(s16) = COPY $h0224    %1:_(s32) = G_SEXT %0(s16)225    %2:_(s32) = G_ASSERT_SEXT %1(s32), 11226    %3:_(s64) = G_SEXT %2(s32)227    $x0 = COPY %3(s64)228...229---230name:            test_combine_sext_sext_vec231body:             |232  bb.1:233  liveins: $s0234    ; CHECK-LABEL: name: test_combine_sext_sext_vec235    ; CHECK: liveins: $s0236    ; CHECK-NEXT: {{  $}}237    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $s0238    ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(<2 x s64>) = G_SEXT [[COPY]](<2 x s16>)239    ; CHECK-NEXT: $q0 = COPY [[SEXT]](<2 x s64>)240    %0:_(<2 x s16>) = COPY $s0241    %1:_(<2 x s32>) = G_SEXT %0(<2 x s16>)242    %2:_(<2 x s64>) = G_SEXT %1(<2 x s32>)243    $q0 = COPY %2(<2 x s64>)244...245---246name:            test_combine_sext_zext247body:             |248  bb.1:249  liveins: $h0250    ; CHECK-LABEL: name: test_combine_sext_zext251    ; CHECK: liveins: $h0252    ; CHECK-NEXT: {{  $}}253    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0254    ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[COPY]](s16)255    ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[ZEXT]](s32)256    ; CHECK-NEXT: $x0 = COPY [[SEXT]](s64)257    %0:_(s16) = COPY $h0258    %1:_(s32) = G_ZEXT %0(s16)259    %2:_(s64) = G_SEXT %1(s32)260    $x0 = COPY %2(s64)261...262---263name:            test_combine_sext_zext_with_hint264body:             |265  bb.1:266  liveins: $h0267    ; CHECK-LABEL: name: test_combine_sext_zext_with_hint268    ; CHECK: liveins: $h0269    ; CHECK-NEXT: {{  $}}270    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0271    ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[COPY]](s16)272    ; CHECK-NEXT: [[ASSERT_ZEXT:%[0-9]+]]:_(s32) = G_ASSERT_ZEXT [[ZEXT]], 11273    ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[ASSERT_ZEXT]](s32)274    ; CHECK-NEXT: $x0 = COPY [[SEXT]](s64)275    %0:_(s16) = COPY $h0276    %1:_(s32) = G_ZEXT %0(s16)277    %2:_(s32) = G_ASSERT_ZEXT %1(s32), 11278    %3:_(s64) = G_SEXT %2(s32)279    $x0 = COPY %3(s64)280...281---282name:            test_combine_sext_zext_vec283body:             |284  bb.1:285  liveins: $s0286    ; CHECK-LABEL: name: test_combine_sext_zext_vec287    ; CHECK: liveins: $s0288    ; CHECK-NEXT: {{  $}}289    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $s0290    ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(<2 x s32>) = G_ZEXT [[COPY]](<2 x s16>)291    ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(<2 x s64>) = G_SEXT [[ZEXT]](<2 x s32>)292    ; CHECK-NEXT: $q0 = COPY [[SEXT]](<2 x s64>)293    %0:_(<2 x s16>) = COPY $s0294    %1:_(<2 x s32>) = G_ZEXT %0(<2 x s16>)295    %2:_(<2 x s64>) = G_SEXT %1(<2 x s32>)296    $q0 = COPY %2(<2 x s64>)297...298---299name:            test_combine_zext_zext300body:             |301  bb.1:302  liveins: $h0303    ; CHECK-LABEL: name: test_combine_zext_zext304    ; CHECK: liveins: $h0305    ; CHECK-NEXT: {{  $}}306    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0307    ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY]](s16)308    ; CHECK-NEXT: $x0 = COPY [[ZEXT]](s64)309    %0:_(s16) = COPY $h0310    %1:_(s32) = G_ZEXT %0(s16)311    %2:_(s64) = G_ZEXT %1(s32)312    $x0 = COPY %2(s64)313...314---315name:            test_combine_zext_zext_with_hint316body:             |317  bb.1:318  liveins: $h0319    ; CHECK-LABEL: name: test_combine_zext_zext_with_hint320    ; CHECK: liveins: $h0321    ; CHECK-NEXT: {{  $}}322    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0323    ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY]](s16)324    ; CHECK-NEXT: $x0 = COPY [[ZEXT]](s64)325    %0:_(s16) = COPY $h0326    %1:_(s32) = G_ZEXT %0(s16)327    %2:_(s32) = G_ASSERT_ZEXT %1(s32), 11328    %3:_(s64) = G_ZEXT %2(s32)329    $x0 = COPY %3(s64)330...331---332name:            test_combine_zext_zext_vec333body:             |334  bb.1:335  liveins: $s0336    ; CHECK-LABEL: name: test_combine_zext_zext_vec337    ; CHECK: liveins: $s0338    ; CHECK-NEXT: {{  $}}339    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $s0340    ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(<2 x s64>) = G_ZEXT [[COPY]](<2 x s16>)341    ; CHECK-NEXT: $q0 = COPY [[ZEXT]](<2 x s64>)342    %0:_(<2 x s16>) = COPY $s0343    %1:_(<2 x s32>) = G_ZEXT %0(<2 x s16>)344    %2:_(<2 x s64>) = G_ZEXT %1(<2 x s32>)345    $q0 = COPY %2(<2 x s64>)346...347---348name:            test_combine_zext_anyext349body:             |350  bb.1:351  liveins: $h0352    ; CHECK-LABEL: name: test_combine_zext_anyext353    ; CHECK: liveins: $h0354    ; CHECK-NEXT: {{  $}}355    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0356    ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY]](s16)357    ; CHECK-NEXT: $x0 = COPY [[ZEXT]](s64)358    %0:_(s16) = COPY $h0359    %1:_(s32) = G_ANYEXT %0(s16)360    %2:_(s64) = G_ZEXT %1(s32)361    $x0 = COPY %2(s64)362...363---364name:            test_combine_sext_anyext365body:             |366  bb.1:367  liveins: $h0368    ; CHECK-LABEL: name: test_combine_sext_anyext369    ; CHECK: liveins: $h0370    ; CHECK-NEXT: {{  $}}371    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0372    ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[COPY]](s16)373    ; CHECK-NEXT: $x0 = COPY [[SEXT]](s64)374    %0:_(s16) = COPY $h0375    %1:_(s32) = G_ANYEXT %0(s16)376    %2:_(s64) = G_SEXT %1(s32)377    $x0 = COPY %2(s64)378...379---380name:            test_combine_nneg_zext_anyext381body:             |382  bb.1:383  liveins: $h0384    ; CHECK-LABEL: name: test_combine_nneg_zext_anyext385    ; CHECK: liveins: $h0386    ; CHECK-NEXT: {{  $}}387    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0388    ; CHECK-NEXT: %2:_(s64) = nneg G_ZEXT [[COPY]](s16)389    ; CHECK-NEXT: $x0 = COPY %2(s64)390    %0:_(s16) = COPY $h0391    %1:_(s32) = G_ANYEXT %0(s16)392    %2:_(s64) = nneg G_ZEXT %1(s32)393    $x0 = COPY %2(s64)394...395---396name:            test_combine_anyext_nneg_zext397body:             |398  bb.1:399  liveins: $h0400    ; CHECK-LABEL: name: test_combine_anyext_nneg_zext401    ; CHECK: liveins: $h0402    ; CHECK-NEXT: {{  $}}403    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0404    ; CHECK-NEXT: %2:_(s64) = nneg G_ZEXT [[COPY]](s16)405    ; CHECK-NEXT: $x0 = COPY %2(s64)406    %0:_(s16) = COPY $h0407    %1:_(s32) = nneg G_ZEXT %0(s16)408    %2:_(s64) = G_ANYEXT %1(s32)409    $x0 = COPY %2(s64)410...411