brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.7 KiB · a9c0f31 Raw
136 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple aarch64 -verify-machineinstrs -run-pass=legalizer -debugify-and-strip-all-safe %s -o - | FileCheck %s3 4---5name:            narrow_scalar_usube_s1286body:             |7  bb.0.entry:8    ; CHECK-LABEL: name: narrow_scalar_usube_s1289    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x010    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x111    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x212    ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s64) = COPY $x313    ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s64) = COPY $x414    ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY4]](s64)15    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 116    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[TRUNC]], [[C]]17    ; CHECK-NEXT: [[USUBE:%[0-9]+]]:_(s64), [[USUBE1:%[0-9]+]]:_(s32) = G_USUBE [[COPY]], [[COPY2]], [[AND]]18    ; CHECK-NEXT: [[USUBE2:%[0-9]+]]:_(s64), [[USUBE3:%[0-9]+]]:_(s32) = G_USUBE [[COPY1]], [[COPY3]], [[USUBE1]]19    ; CHECK-NEXT: %carry_out_ext:_(s64) = G_ANYEXT [[USUBE3]](s32)20    ; CHECK-NEXT: $x0 = COPY [[USUBE]](s64)21    ; CHECK-NEXT: $x1 = COPY [[USUBE2]](s64)22    ; CHECK-NEXT: $x2 = COPY %carry_out_ext(s64)23    %0:_(s64) = COPY $x024    %1:_(s64) = COPY $x125    %2:_(s64) = COPY $x226    %3:_(s64) = COPY $x327    %4:_(s64) = COPY $x428    %lhs:_(s128) = G_MERGE_VALUES %0, %129    %rhs:_(s128) = G_MERGE_VALUES %2, %330    %carry_in:_(s1) = G_TRUNC %431    %sub:_(s128), %carry_out:_(s1) = G_USUBE %lhs, %rhs, %carry_in32    %sub0:_(s64), %sub1:_(s64) = G_UNMERGE_VALUES %sub33    %carry_out_ext:_(s64) = G_ANYEXT %carry_out34    $x0 = COPY %sub035    $x1 = COPY %sub136    $x2 = COPY %carry_out_ext37 38...39---40name:            narrow_scalar_usube_big_nonpow241body:             |42  bb.0.entry:43    ; CHECK-LABEL: name: narrow_scalar_usube_big_nonpow244    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x045    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x146    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x247    ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s64) = COPY $x348    ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s64) = COPY $x449    ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY4]](s64)50    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 151    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[TRUNC]], [[C]]52    ; CHECK-NEXT: [[USUBE:%[0-9]+]]:_(s64), [[USUBE1:%[0-9]+]]:_(s32) = G_USUBE [[COPY]], [[COPY1]], [[AND]]53    ; CHECK-NEXT: [[USUBE2:%[0-9]+]]:_(s64), [[USUBE3:%[0-9]+]]:_(s32) = G_USUBE [[COPY1]], [[COPY2]], [[USUBE1]]54    ; CHECK-NEXT: [[USUBE4:%[0-9]+]]:_(s64), [[USUBE5:%[0-9]+]]:_(s32) = G_USUBE [[COPY2]], [[COPY3]], [[USUBE3]]55    ; CHECK-NEXT: %carry_out_ext:_(s64) = G_ANYEXT [[USUBE5]](s32)56    ; CHECK-NEXT: $x0 = COPY [[USUBE]](s64)57    ; CHECK-NEXT: $x1 = COPY [[USUBE2]](s64)58    ; CHECK-NEXT: $x2 = COPY [[USUBE4]](s64)59    ; CHECK-NEXT: $x3 = COPY %carry_out_ext(s64)60    %0:_(s64) = COPY $x061    %1:_(s64) = COPY $x162    %2:_(s64) = COPY $x263    %3:_(s64) = COPY $x364    %4:_(s64) = COPY $x465    %lhs:_(s192) = G_MERGE_VALUES %0, %1, %266    %rhs:_(s192) = G_MERGE_VALUES %1, %2, %367    %carry_in:_(s1) = G_TRUNC %468    %sub:_(s192), %carry_out:_(s1) = G_USUBE %lhs, %rhs, %carry_in69    %sub0:_(s64), %sub1:_(s64), %sub2:_(s64) = G_UNMERGE_VALUES %sub70    %carry_out_ext:_(s64) = G_ANYEXT %carry_out71    $x0 = COPY %sub072    $x1 = COPY %sub173    $x2 = COPY %sub274    $x3 = COPY %carry_out_ext75 76...77---78name:            widen_scalar_usube_s879body:             |80  bb.0.entry:81    ; CHECK-LABEL: name: widen_scalar_usube_s882    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x083    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x184    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x285    ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)86    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 25587    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[TRUNC]], [[C]]88    ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)89    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[TRUNC1]], [[C]]90    ; CHECK-NEXT: [[TRUNC2:%[0-9]+]]:_(s32) = G_TRUNC [[COPY2]](s64)91    ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 192    ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[TRUNC2]], [[C1]]93    ; CHECK-NEXT: [[USUBE:%[0-9]+]]:_(s32), [[USUBE1:%[0-9]+]]:_(s32) = G_USUBE [[AND]], [[AND1]], [[AND2]]94    ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[USUBE]], [[C]]95    ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[USUBE]](s32), [[AND3]]96    ; CHECK-NEXT: %sub_ext:_(s64) = G_ANYEXT [[USUBE]](s32)97    ; CHECK-NEXT: %carry_out_ext:_(s64) = G_ANYEXT [[ICMP]](s32)98    ; CHECK-NEXT: $x0 = COPY %sub_ext(s64)99    ; CHECK-NEXT: $x1 = COPY %carry_out_ext(s64)100    %0:_(s64) = COPY $x0101    %1:_(s64) = COPY $x1102    %2:_(s64) = COPY $x2103    %lhs:_(s8) = G_TRUNC %0104    %rhs:_(s8) = G_TRUNC %1105    %carry_in:_(s1) = G_TRUNC %2106    %sub:_(s8), %carry_out:_(s1) = G_USUBE %lhs, %rhs, %carry_in107    %sub_ext:_(s64) = G_ANYEXT %sub108    %carry_out_ext:_(s64) = G_ANYEXT %carry_out109    $x0 = COPY %sub_ext110    $x1 = COPY %carry_out_ext111 112...113---114name:            test_scalar_usube_32115body:             |116  bb.0.entry:117    ; CHECK-LABEL: name: test_scalar_usube_32118    ; CHECK: %lhs:_(s32) = COPY $w0119    ; CHECK-NEXT: %rhs:_(s32) = COPY $w1120    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w2121    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1122    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]123    ; CHECK-NEXT: %sub:_(s32), %8:_(s32) = G_USUBE %lhs, %rhs, [[AND]]124    ; CHECK-NEXT: $w0 = COPY %sub(s32)125    ; CHECK-NEXT: $w1 = COPY %8(s32)126    %lhs:_(s32) = COPY $w0127    %rhs:_(s32) = COPY $w1128    %2:_(s32) = COPY $w2129    %carry_in:_(s1) = G_TRUNC %2130    %sub:_(s32), %carry_out:_(s1) = G_USUBE %lhs, %rhs, %carry_in131    %carry_out_ext:_(s32) = G_ANYEXT %carry_out132    $w0 = COPY %sub133    $w1 = COPY %carry_out_ext134 135...136