brintos

brintos / llvm-project-archived public Read only

0
0
Text · 9.7 KiB · 5cbff0f Raw
370 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple aarch64 -run-pass=aarch64-prelegalizer-combiner %s -o - | FileCheck %s3 4 5---6name:   ZeroMinusAPlusB7body:             |8  bb.0:9    liveins: $w0, $w110 11    ; CHECK-LABEL: name: ZeroMinusAPlusB12    ; CHECK: liveins: $w0, $w113    ; CHECK-NEXT: {{  $}}14    ; CHECK-NEXT: %a:_(s32) = COPY $w015    ; CHECK-NEXT: %b:_(s32) = COPY $w016    ; CHECK-NEXT: %add:_(s32) = G_SUB %b, %a17    ; CHECK-NEXT: $w0 = COPY %add(s32)18    ; CHECK-NEXT: RET_ReallyLR implicit $w019    %x:_(s32) = COPY $w020    %a:_(s32) = COPY $w021    %b:_(s32) = COPY $w022    %zero:_(s32) = G_CONSTANT i32 023    %sub:_(s32) = G_SUB %zero, %a24    %add:_(s32) = G_ADD %sub, %b25    $w0 = COPY %add26    RET_ReallyLR implicit $w027 28...29---30name:   ZeroMinusAPlusB_multi_use31body:             |32  bb.0:33    liveins: $w0, $w134 35    ; CHECK-LABEL: name: ZeroMinusAPlusB_multi_use36    ; CHECK: liveins: $w0, $w137    ; CHECK-NEXT: {{  $}}38    ; CHECK-NEXT: %a:_(s32) = COPY $w039    ; CHECK-NEXT: %b:_(s32) = COPY $w040    ; CHECK-NEXT: %zero:_(s32) = G_CONSTANT i32 041    ; CHECK-NEXT: %sub:_(s32) = G_SUB %zero, %a42    ; CHECK-NEXT: %add:_(s32) = G_SUB %b, %a43    ; CHECK-NEXT: $w0 = COPY %add(s32)44    ; CHECK-NEXT: $w0 = COPY %sub(s32)45    ; CHECK-NEXT: RET_ReallyLR implicit $w046    %x:_(s32) = COPY $w047    %a:_(s32) = COPY $w048    %b:_(s32) = COPY $w049    %zero:_(s32) = G_CONSTANT i32 050    %sub:_(s32) = G_SUB %zero, %a51    %add:_(s32) = G_ADD %sub, %b52    $w0 = COPY %add53    $w0 = COPY %sub54    RET_ReallyLR implicit $w055 56...57---58name:   APlusZeroMiunusB59body:             |60  bb.0:61    liveins: $w0, $w162 63    ; CHECK-LABEL: name: APlusZeroMiunusB64    ; CHECK: liveins: $w0, $w165    ; CHECK-NEXT: {{  $}}66    ; CHECK-NEXT: %a:_(s64) = COPY $x167    ; CHECK-NEXT: %b:_(s64) = COPY $x268    ; CHECK-NEXT: %add:_(s64) = G_SUB %a, %b69    ; CHECK-NEXT: $x0 = COPY %add(s64)70    ; CHECK-NEXT: RET_ReallyLR implicit $x071    %x:_(s64) = COPY $x072    %a:_(s64) = COPY $x173    %b:_(s64) = COPY $x274    %zero:_(s64) = G_CONSTANT i64 075    %sub:_(s64) = G_SUB %zero, %b76    %add:_(s64) = G_ADD %a, %sub77    $x0 = COPY %add78    RET_ReallyLR implicit $x079 80...81---82name:   APlusBMinusB83body:             |84  bb.0:85    liveins: $w0, $w186 87    ; CHECK-LABEL: name: APlusBMinusB88    ; CHECK: liveins: $w0, $w189    ; CHECK-NEXT: {{  $}}90    ; CHECK-NEXT: %b:_(s64) = COPY $x191    ; CHECK-NEXT: $x0 = COPY %b(s64)92    ; CHECK-NEXT: RET_ReallyLR implicit $x093    %a:_(s64) = COPY $x094    %b:_(s64) = COPY $x195    %zero:_(s64) = G_CONSTANT i64 096    %sub:_(s64) = G_SUB %b, %a97    %add:_(s64) = G_ADD %a, %sub98    $x0 = COPY %add99    RET_ReallyLR implicit $x0100 101...102---103name:   BMinusAPlusA104body:             |105  bb.0:106    liveins: $w0, $w1107 108    ; CHECK-LABEL: name: BMinusAPlusA109    ; CHECK: liveins: $w0, $w1110    ; CHECK-NEXT: {{  $}}111    ; CHECK-NEXT: %b:_(s64) = COPY $x1112    ; CHECK-NEXT: $x0 = COPY %b(s64)113    ; CHECK-NEXT: RET_ReallyLR implicit $x0114    %a:_(s64) = COPY $x0115    %b:_(s64) = COPY $x1116    %zero:_(s64) = G_CONSTANT i64 0117    %sub:_(s64) = G_SUB %b, %a118    %add:_(s64) = G_ADD %sub, %a119    $x0 = COPY %add120    RET_ReallyLR implicit $x0121 122...123---124name:   AMinusBPlusCMinusA125body:             |126  bb.0:127    liveins: $w0, $w1128 129    ; CHECK-LABEL: name: AMinusBPlusCMinusA130    ; CHECK: liveins: $w0, $w1131    ; CHECK-NEXT: {{  $}}132    ; CHECK-NEXT: %b:_(s64) = COPY $x1133    ; CHECK-NEXT: %c:_(s64) = COPY $x2134    ; CHECK-NEXT: %add:_(s64) = G_SUB %c, %b135    ; CHECK-NEXT: $x0 = COPY %add(s64)136    ; CHECK-NEXT: RET_ReallyLR implicit $x0137    %a:_(s64) = COPY $x0138    %b:_(s64) = COPY $x1139    %c:_(s64) = COPY $x2140    %zero:_(s64) = G_CONSTANT i64 0141    %sub2:_(s64) = G_SUB %c, %a142    %sub1:_(s64) = G_SUB %a, %b143    %add:_(s64) = G_ADD %sub1, %sub2144    $x0 = COPY %add145    RET_ReallyLR implicit $x0146 147...148---149name:   AMinusBPlusBMinusC150body:             |151  bb.0:152    liveins: $w0, $w1153 154    ; CHECK-LABEL: name: AMinusBPlusBMinusC155    ; CHECK: liveins: $w0, $w1156    ; CHECK-NEXT: {{  $}}157    ; CHECK-NEXT: %a:_(s64) = COPY $x0158    ; CHECK-NEXT: %c:_(s64) = COPY $x2159    ; CHECK-NEXT: %add:_(s64) = G_SUB %a, %c160    ; CHECK-NEXT: $x0 = COPY %add(s64)161    ; CHECK-NEXT: RET_ReallyLR implicit $x0162    %a:_(s64) = COPY $x0163    %b:_(s64) = COPY $x1164    %c:_(s64) = COPY $x2165    %zero:_(s64) = G_CONSTANT i64 0166    %sub2:_(s64) = G_SUB %b, %c167    %sub1:_(s64) = G_SUB %a, %b168    %add:_(s64) = G_ADD %sub1, %sub2169    $x0 = COPY %add170    RET_ReallyLR implicit $x0171 172 173...174---175name:   APlusBMinusAplusC176body:             |177  bb.0:178    liveins: $w0, $w1179 180    ; CHECK-LABEL: name: APlusBMinusAplusC181    ; CHECK: liveins: $w0, $w1182    ; CHECK-NEXT: {{  $}}183    ; CHECK-NEXT: %b:_(s64) = COPY $x1184    ; CHECK-NEXT: %c:_(s64) = COPY $x2185    ; CHECK-NEXT: %add:_(s64) = G_SUB %b, %c186    ; CHECK-NEXT: $x0 = COPY %add(s64)187    ; CHECK-NEXT: RET_ReallyLR implicit $x0188    %a:_(s64) = COPY $x0189    %b:_(s64) = COPY $x1190    %c:_(s64) = COPY $x2191    %zero:_(s64) = G_CONSTANT i64 0192    %add1:_(s64) = G_ADD %a, %c193    %sub1:_(s64) = G_SUB %b, %add1194    %add:_(s64) = G_ADD %a, %sub1195    $x0 = COPY %add196    RET_ReallyLR implicit $x0197 198...199---200name:   APlusBMinusCPlusA201body:             |202  bb.0:203    liveins: $w0, $w1204 205    ; CHECK-LABEL: name: APlusBMinusCPlusA206    ; CHECK: liveins: $w0, $w1207    ; CHECK-NEXT: {{  $}}208    ; CHECK-NEXT: %b:_(s64) = COPY $x1209    ; CHECK-NEXT: %c:_(s64) = COPY $x2210    ; CHECK-NEXT: %add:_(s64) = G_SUB %b, %c211    ; CHECK-NEXT: $x0 = COPY %add(s64)212    ; CHECK-NEXT: RET_ReallyLR implicit $x0213    %a:_(s64) = COPY $x0214    %b:_(s64) = COPY $x1215    %c:_(s64) = COPY $x2216    %zero:_(s64) = G_CONSTANT i64 0217    %add1:_(s64) = G_ADD %c, %a218    %sub1:_(s64) = G_SUB %b, %add1219    %add:_(s64) = G_ADD %a, %sub1220    $x0 = COPY %add221    RET_ReallyLR implicit $x0222 223...224---225name:   APlusBMinusCPlusA_BV226body:             |227  bb.0:228    liveins: $w0, $w1229 230    ; CHECK-LABEL: name: APlusBMinusCPlusA_BV231    ; CHECK: liveins: $w0, $w1232    ; CHECK-NEXT: {{  $}}233    ; CHECK-NEXT: %a1:_(s64) = COPY $x0234    ; CHECK-NEXT: %b1:_(s64) = COPY $x1235    ; CHECK-NEXT: %c1:_(s64) = COPY $x2236    ; CHECK-NEXT: %b:_(<2 x s64>) = G_BUILD_VECTOR %b1(s64), %ba:_(s64)237    ; CHECK-NEXT: %c:_(<2 x s64>) = G_BUILD_VECTOR %a1(s64), %c1(s64)238    ; CHECK-NEXT: %add:_(<2 x s64>) = G_SUB %b, %c239    ; CHECK-NEXT: $q0 = COPY %add(<2 x s64>)240    ; CHECK-NEXT: RET_ReallyLR implicit $x0241    %a1:_(s64) = COPY $x0242    %b1:_(s64) = COPY $x1243    %c1:_(s64) = COPY $x2244    %a:_(<2 x s64>) = G_BUILD_VECTOR %a1:_(s64), %b1:_(s64)245    %b:_(<2 x s64>) = G_BUILD_VECTOR %b1:_(s64), %ba:_(s64)246    %c:_(<2 x s64>) = G_BUILD_VECTOR %a1:_(s64), %c1:_(s64)247    %zero:_(s64) = G_CONSTANT i64 0248    %add1:_(<2 x s64>) = G_ADD %c, %a249    %sub1:_(<2 x s64>) = G_SUB %b, %add1250    %add:_(<2 x s64>) = G_ADD %a, %sub1251    $q0 = COPY %add252    RET_ReallyLR implicit $x0253 254...255---256name:   APlusC1MinusC2257body:             |258  bb.0:259    liveins: $w0, $w1260 261    ; CHECK-LABEL: name: APlusC1MinusC2262    ; CHECK: liveins: $w0, $w1263    ; CHECK-NEXT: {{  $}}264    ; CHECK-NEXT: %a:_(s64) = COPY $x0265    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -2266    ; CHECK-NEXT: %sub:_(s64) = G_ADD %a, [[C]]267    ; CHECK-NEXT: $x0 = COPY %sub(s64)268    ; CHECK-NEXT: RET_ReallyLR implicit $x0269    %a:_(s64) = COPY $x0270    %c1:_(s64) = G_CONSTANT i64 5271    %c2:_(s64) = G_CONSTANT i64 7272    %add:_(s64) = G_ADD %a, %c1273    %sub:_(s64) = G_SUB %add, %c2274    $x0 = COPY %sub275    RET_ReallyLR implicit $x0276 277...278---279name:   C2MinusAPlusC1280body:             |281  bb.0:282    liveins: $w0, $w1283 284    ; CHECK-LABEL: name: C2MinusAPlusC1285    ; CHECK: liveins: $w0, $w1286    ; CHECK-NEXT: {{  $}}287    ; CHECK-NEXT: %a:_(s64) = COPY $x0288    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 5289    ; CHECK-NEXT: %sub:_(s64) = G_SUB [[C]], %a290    ; CHECK-NEXT: $x0 = COPY %sub(s64)291    ; CHECK-NEXT: RET_ReallyLR implicit $x0292    %a:_(s64) = COPY $x0293    %c1:_(s64) = G_CONSTANT i64 4294    %c2:_(s64) = G_CONSTANT i64 9295    %add:_(s64) = G_ADD %a, %c1296    %sub:_(s64) = G_SUB %c2, %add297    $x0 = COPY %sub298    RET_ReallyLR implicit $x0299 300...301---302name:   AMinusC1MinusC2303body:             |304  bb.0:305    liveins: $w0, $w1306 307    ; CHECK-LABEL: name: AMinusC1MinusC2308    ; CHECK: liveins: $w0, $w1309    ; CHECK-NEXT: {{  $}}310    ; CHECK-NEXT: %a:_(s64) = COPY $x0311    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -71312    ; CHECK-NEXT: %sub:_(s64) = G_ADD %a, [[C]]313    ; CHECK-NEXT: $x0 = COPY %sub(s64)314    ; CHECK-NEXT: RET_ReallyLR implicit $x0315    %a:_(s64) = COPY $x0316    %c1:_(s64) = G_CONSTANT i64 11317    %c2:_(s64) = G_CONSTANT i64 60318    %sub1:_(s64) = G_SUB %a, %c1319    %sub:_(s64) = G_SUB %sub1, %c2320    $x0 = COPY %sub321    RET_ReallyLR implicit $x0322 323...324---325name:   C1Minus2MinusC2326body:             |327  bb.0:328    liveins: $w0, $w1329 330    ; CHECK-LABEL: name: C1Minus2MinusC2331    ; CHECK: liveins: $w0, $w1332    ; CHECK-NEXT: {{  $}}333    ; CHECK-NEXT: %a:_(s64) = COPY $x0334    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -49335    ; CHECK-NEXT: %sub:_(s64) = G_SUB [[C]], %a336    ; CHECK-NEXT: $x0 = COPY %sub(s64)337    ; CHECK-NEXT: RET_ReallyLR implicit $x0338    %a:_(s64) = COPY $x0339    %c1:_(s64) = G_CONSTANT i64 11340    %c2:_(s64) = G_CONSTANT i64 60341    %sub1:_(s64) = G_SUB %c1, %a342    %sub:_(s64) = G_SUB %sub1, %c2343    $x0 = COPY %sub344    RET_ReallyLR implicit $x0345 346 347...348---349name:   AMinusC2PlusC2350body:             |351  bb.0:352    liveins: $w0, $w1353 354    ; CHECK-LABEL: name: AMinusC2PlusC2355    ; CHECK: liveins: $w0, $w1356    ; CHECK-NEXT: {{  $}}357    ; CHECK-NEXT: %a:_(s64) = COPY $x0358    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 43359    ; CHECK-NEXT: %add:_(s64) = G_ADD %a, [[C]]360    ; CHECK-NEXT: $x0 = COPY %add(s64)361    ; CHECK-NEXT: RET_ReallyLR implicit $x0362    %a:_(s64) = COPY $x0363    %c1:_(s64) = G_CONSTANT i64 13364    %c2:_(s64) = G_CONSTANT i64 56365    %sub:_(s64) = G_SUB %a, %c1366    %add:_(s64) = G_ADD %sub, %c2367    $x0 = COPY %add368    RET_ReallyLR implicit $x0369 370