brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.8 KiB · 3a10f47 Raw
320 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple aarch64 -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s3 4name:            uitofp_to_zero5alignment:       46tracksRegLiveness: true7body:             |8  bb.0:9    ; CHECK-LABEL: name: uitofp_to_zero10    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 0.000000e+0011    ; CHECK: $s0 = COPY [[C]](s32)12    ; CHECK: RET_ReallyLR implicit $s013    %0:_(s32) = G_IMPLICIT_DEF14    %1:_(s32) = G_UITOFP %0(s32)15    $s0 = COPY %1(s32)16    RET_ReallyLR implicit $s017 18...19---20name:            sitofp_to_zero21alignment:       422tracksRegLiveness: true23body:             |24  bb.0:25    ; CHECK-LABEL: name: sitofp_to_zero26    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 0.000000e+0027    ; CHECK-NEXT: $s0 = COPY [[C]](s32)28    ; CHECK-NEXT: RET_ReallyLR implicit $s029    %0:_(s32) = G_IMPLICIT_DEF30    %1:_(s32) = G_SITOFP %0(s32)31    $s0 = COPY %1(s32)32    RET_ReallyLR implicit $s033 34...35---36name:            and_to_zero37alignment:       438tracksRegLiveness: true39body:             |40  bb.0:41    ; CHECK-LABEL: name: and_to_zero42    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 043    ; CHECK-NEXT: $w0 = COPY [[C]](s32)44    ; CHECK-NEXT: RET_ReallyLR implicit $w045    %0:_(s32) = G_CONSTANT i32 1046    %1:_(s32) = G_IMPLICIT_DEF47    %2:_(s32) = G_AND %0, %148    $w0 = COPY %2(s32)49    RET_ReallyLR implicit $w050 51...52---53name:            mul_to_zero54alignment:       455tracksRegLiveness: true56body:             |57  bb.0:58    ; CHECK-LABEL: name: mul_to_zero59    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 060    ; CHECK-NEXT: $w0 = COPY [[C]](s32)61    ; CHECK-NEXT: RET_ReallyLR implicit $w062    %0:_(s32) = G_CONSTANT i32 1063    %1:_(s32) = G_IMPLICIT_DEF64    %2:_(s32) = G_MUL %0, %165    $w0 = COPY %2(s32)66    RET_ReallyLR implicit $w067 68...69---70name:            or_to_negative_one71alignment:       472tracksRegLiveness: true73body:             |74  bb.0:75    ; CHECK-LABEL: name: or_to_negative_one76    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -177    ; CHECK-NEXT: $w0 = COPY [[C]](s32)78    ; CHECK-NEXT: RET_ReallyLR implicit $w079    %0:_(s32) = G_CONSTANT i32 1080    %1:_(s32) = G_IMPLICIT_DEF81    %2:_(s32) = G_OR %0, %182    $w0 = COPY %2(s32)83    RET_ReallyLR implicit $w084 85...86---87name:            xor_to_undef88alignment:       489tracksRegLiveness: true90body:             |91  bb.0:92    ; CHECK-LABEL: name: xor_to_undef93    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF94    ; CHECK-NEXT: $w0 = COPY [[DEF]](s32)95    ; CHECK-NEXT: RET_ReallyLR implicit $w096    %0:_(s32) = G_CONSTANT i32 1097    %1:_(s32) = G_IMPLICIT_DEF98    %2:_(s32) = G_XOR %0, %199    $w0 = COPY %2(s32)100    RET_ReallyLR implicit $w0101 102...103---104name:            add_to_undef105alignment:       4106tracksRegLiveness: true107body:             |108  bb.0:109    ; CHECK-LABEL: name: add_to_undef110    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF111    ; CHECK-NEXT: $w0 = COPY [[DEF]](s32)112    ; CHECK-NEXT: RET_ReallyLR implicit $w0113    %0:_(s32) = G_CONSTANT i32 10114    %1:_(s32) = G_IMPLICIT_DEF115    %2:_(s32) = G_ADD %0, %1116    $w0 = COPY %2(s32)117    RET_ReallyLR implicit $w0118 119...120---121name:            sub_to_undef122alignment:       4123tracksRegLiveness: true124body:             |125  bb.0:126    ; CHECK-LABEL: name: sub_to_undef127    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF128    ; CHECK-NEXT: $w0 = COPY [[DEF]](s32)129    ; CHECK-NEXT: RET_ReallyLR implicit $w0130    %0:_(s32) = G_CONSTANT i32 10131    %1:_(s32) = G_IMPLICIT_DEF132    %2:_(s32) = G_SUB %0, %1133    $w0 = COPY %2(s32)134    RET_ReallyLR implicit $w0135 136...137---138name:            fptoui_to_undef139alignment:       4140tracksRegLiveness: true141body:             |142  bb.0:143    ; CHECK-LABEL: name: fptoui_to_undef144    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF145    ; CHECK-NEXT: $w0 = COPY [[DEF]](s32)146    ; CHECK-NEXT: RET_ReallyLR implicit $w0147    %0:_(s32) = G_IMPLICIT_DEF148    %1:_(s32) = G_FPTOUI %0(s32)149    $w0 = COPY %1(s32)150    RET_ReallyLR implicit $w0151 152...153---154name:            fptosi_to_undef155alignment:       4156tracksRegLiveness: true157body:             |158  bb.0:159    ; CHECK-LABEL: name: fptosi_to_undef160    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF161    ; CHECK-NEXT: $w0 = COPY [[DEF]](s32)162    ; CHECK-NEXT: RET_ReallyLR implicit $w0163    %0:_(s32) = G_IMPLICIT_DEF164    %1:_(s32) = G_FPTOSI %0(s32)165    $w0 = COPY %1(s32)166    RET_ReallyLR implicit $w0167 168...169---170name:            shufflevector_undef_ops_to_undef171alignment:       4172tracksRegLiveness: true173body:             |174  bb.0:175    ; CHECK-LABEL: name: shufflevector_undef_ops_to_undef176    ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF177    ; CHECK-NEXT: $d0 = COPY [[DEF]](<2 x s32>)178    ; CHECK-NEXT: RET_ReallyLR implicit $d0179    %1:_(<2 x s32>) = G_IMPLICIT_DEF180    %2:_(<2 x s32>) = G_IMPLICIT_DEF181    %0:_(<2 x s32>) = G_SHUFFLE_VECTOR %1(<2 x s32>), %2(<2 x s32>), shufflemask(0, 1)182    $d0 = COPY %0(<2 x s32>)183    RET_ReallyLR implicit $d0184 185...186---187name:            shufflevector_undef_mask_to_undef188alignment:       4189tracksRegLiveness: true190body:             |191  bb.0:192    liveins: $d0, $d1193    ; CHECK-LABEL: name: shufflevector_undef_mask_to_undef194    ; CHECK: liveins: $d0, $d1195    ; CHECK-NEXT: {{  $}}196    ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF197    ; CHECK-NEXT: $d0 = COPY [[DEF]](<2 x s32>)198    ; CHECK-NEXT: RET_ReallyLR implicit $d0199    %0:_(<2 x s32>) = COPY $d0200    %1:_(<2 x s32>) = COPY $d1201    %2:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %1, shufflemask(undef, undef)202    $d0 = COPY %2(<2 x s32>)203    RET_ReallyLR implicit $d0204 205...206---207name:            shufflevector_not_all_ops_undef208alignment:       4209tracksRegLiveness: true210body:             |211  bb.0:212    liveins: $d0213    ; Show that we don't do the combine when one of the vectors is not a G_IMPLICIT_DEF.214    ; CHECK-LABEL: name: shufflevector_not_all_ops_undef215    ; CHECK: liveins: $d0216    ; CHECK-NEXT: {{  $}}217    ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF218    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0219    ; CHECK-NEXT: [[SHUF:%[0-9]+]]:_(<2 x s32>) = G_SHUFFLE_VECTOR [[DEF]](<2 x s32>), [[COPY]], shufflemask(0, 1)220    ; CHECK-NEXT: $d0 = COPY [[SHUF]](<2 x s32>)221    ; CHECK-NEXT: RET_ReallyLR implicit $d0222    %1:_(<2 x s32>) = G_IMPLICIT_DEF223    %2:_(<2 x s32>) = COPY $d0224    %0:_(<2 x s32>) = G_SHUFFLE_VECTOR %1(<2 x s32>), %2(<2 x s32>), shufflemask(0, 1)225    $d0 = COPY %0(<2 x s32>)226    RET_ReallyLR implicit $d0227 228...229---230name:            shl_undef_rhs231alignment:       4232tracksRegLiveness: true233body:             |234  bb.0:235    ; CHECK-LABEL: name: shl_undef_rhs236    ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF237    ; CHECK-NEXT: $x0 = COPY [[DEF]](s64)238    ; CHECK-NEXT: RET_ReallyLR implicit $x0239    %0:_(s64) = G_CONSTANT i64 10240    %1:_(s64) = G_IMPLICIT_DEF241    %2:_(s64) = G_SHL %0, %1242    $x0 = COPY %2(s64)243    RET_ReallyLR implicit $x0244 245...246---247name:            lshr_undef_rhs248alignment:       4249tracksRegLiveness: true250body:             |251  bb.0:252    ; CHECK-LABEL: name: lshr_undef_rhs253    ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF254    ; CHECK-NEXT: $x0 = COPY [[DEF]](s64)255    ; CHECK-NEXT: RET_ReallyLR implicit $x0256    %0:_(s64) = G_CONSTANT i64 10257    %1:_(s64) = G_IMPLICIT_DEF258    %2:_(s64) = G_LSHR %0, %1259    $x0 = COPY %2(s64)260    RET_ReallyLR implicit $x0261 262...263---264name:            ashr_undef_rhs265alignment:       4266tracksRegLiveness: true267body:             |268  bb.0:269    ; CHECK-LABEL: name: ashr_undef_rhs270    ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF271    ; CHECK-NEXT: $x0 = COPY [[DEF]](s64)272    ; CHECK-NEXT: RET_ReallyLR implicit $x0273    %0:_(s64) = G_CONSTANT i64 10274    %1:_(s64) = G_IMPLICIT_DEF275    %2:_(s64) = G_ASHR %0, %1276    $x0 = COPY %2(s64)277    RET_ReallyLR implicit $x0278 279...280---281name:            lshr_undef_lhs282alignment:       4283tracksRegLiveness: true284body:             |285  bb.0:286    ; Optimize these to zero?287    ; CHECK-LABEL: name: lshr_undef_lhs288    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 10289    ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF290    ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[DEF]], [[C]](s64)291    ; CHECK-NEXT: $x0 = COPY [[LSHR]](s64)292    ; CHECK-NEXT: RET_ReallyLR implicit $x0293    %0:_(s64) = G_CONSTANT i64 10294    %1:_(s64) = G_IMPLICIT_DEF295    %2:_(s64) = G_LSHR %1, %0296    $x0 = COPY %2(s64)297    RET_ReallyLR implicit $x0298 299...300---301name:            ashr_undef_lhs302alignment:       4303tracksRegLiveness: true304body:             |305  bb.0:306    ; Optimize these to zero?307    ; CHECK-LABEL: name: ashr_undef_lhs308    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 10309    ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF310    ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[DEF]], [[C]](s64)311    ; CHECK-NEXT: $x0 = COPY [[ASHR]](s64)312    ; CHECK-NEXT: RET_ReallyLR implicit $x0313    %0:_(s64) = G_CONSTANT i64 10314    %1:_(s64) = G_IMPLICIT_DEF315    %2:_(s64) = G_ASHR %1, %0316    $x0 = COPY %2(s64)317    RET_ReallyLR implicit $x0318 319...320