brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.9 KiB · 2bad70a Raw
181 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=riscv32 -run-pass=legalizer %s -o - | FileCheck %s3 4---5name:            ssube_i86body:             |7  bb.1:8    liveins: $x10, $x11, $x129 10    ; CHECK-LABEL: name: ssube_i811    ; CHECK: liveins: $x10, $x11, $x1212    ; CHECK-NEXT: {{  $}}13    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x1014    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1115    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x1216    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2417    ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)18    ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)19    ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)20    ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)21    ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[ASHR]], [[ASHR1]]22    ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 123    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C1]]24    ; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[SUB]], [[AND]]25    ; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[SUB1]], [[C]](s32)26    ; CHECK-NEXT: [[ASHR2:%[0-9]+]]:_(s32) = G_ASHR [[SHL2]], [[C]](s32)27    ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[SUB1]](s32), [[ASHR2]]28    ; CHECK-NEXT: $x10 = COPY [[SUB1]](s32)29    ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)30    ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x1131    %0:_(s32) = COPY $x1032    %1:_(s8) = G_TRUNC %0(s32)33    %2:_(s32) = COPY $x1134    %3:_(s8) = G_TRUNC %2(s32)35    %4:_(s32) = COPY $x1236    %5:_(s1) = G_TRUNC %4(s32)37    %6:_(s8), %7:_(s1) = G_SSUBE %1, %3, %538    %8:_(s32) = G_ANYEXT %6(s8)39    %9:_(s32) = G_ANYEXT %7(s1)40    $x10 = COPY %8(s32)41    $x11 = COPY %9(s32)42    PseudoRET implicit $x10, implicit $x1143 44...45---46name:            ssube_i1647body:             |48  bb.1:49    liveins: $x10, $x11, $x1250 51    ; CHECK-LABEL: name: ssube_i1652    ; CHECK: liveins: $x10, $x11, $x1253    ; CHECK-NEXT: {{  $}}54    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x1055    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1156    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x1257    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1658    ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)59    ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C]](s32)60    ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[C]](s32)61    ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[SHL1]], [[C]](s32)62    ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[ASHR]], [[ASHR1]]63    ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 164    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C1]]65    ; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[SUB]], [[AND]]66    ; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[SUB1]], [[C]](s32)67    ; CHECK-NEXT: [[ASHR2:%[0-9]+]]:_(s32) = G_ASHR [[SHL2]], [[C]](s32)68    ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[SUB1]](s32), [[ASHR2]]69    ; CHECK-NEXT: $x10 = COPY [[SUB1]](s32)70    ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)71    ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x1172    %0:_(s32) = COPY $x1073    %1:_(s16) = G_TRUNC %0(s32)74    %2:_(s32) = COPY $x1175    %3:_(s16) = G_TRUNC %2(s32)76    %4:_(s32) = COPY $x1277    %5:_(s1) = G_TRUNC %4(s32)78    %6:_(s16), %7:_(s1) = G_SSUBE %1, %3, %579    %8:_(s32) = G_ANYEXT %6(s16)80    %9:_(s32) = G_ANYEXT %7(s1)81    $x10 = COPY %8(s32)82    $x11 = COPY %9(s32)83    PseudoRET implicit $x10, implicit $x1184 85...86---87name:            ssube_i3288body:             |89  bb.1:90    liveins: $x10, $x11, $x1291 92    ; CHECK-LABEL: name: ssube_i3293    ; CHECK: liveins: $x10, $x11, $x1294    ; CHECK-NEXT: {{  $}}95    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x1096    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1197    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x1298    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 199    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]100    ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY1]], [[AND]]101    ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[ADD]]102    ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY [[SUB]](s32)103    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[COPY]], [[COPY1]]104    ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s32) = G_XOR [[COPY]], [[SUB]]105    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[XOR]], [[XOR1]]106    ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0107    ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[AND1]](s32), [[C1]]108    ; CHECK-NEXT: $x10 = COPY [[COPY3]](s32)109    ; CHECK-NEXT: $x11 = COPY [[ICMP]](s32)110    ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11111    %0:_(s32) = COPY $x10112    %1:_(s32) = COPY $x11113    %2:_(s32) = COPY $x12114    %3:_(s1) = G_TRUNC %2(s32)115    %4:_(s32), %5:_(s1) = G_SSUBE %0, %1, %3116    %6:_(s32) = G_ANYEXT %5(s1)117    $x10 = COPY %4(s32)118    $x11 = COPY %6(s32)119    PseudoRET implicit $x10, implicit $x11120 121...122---123name:            ssube_i64124body:             |125  bb.1:126    liveins: $x10, $x11, $x12, $x13, $x14127 128    ; CHECK-LABEL: name: ssube_i64129    ; CHECK: liveins: $x10, $x11, $x12, $x13, $x14130    ; CHECK-NEXT: {{  $}}131    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10132    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11133    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x12134    ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $x13135    ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $x14136    ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF137    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1138    ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0139    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY4]], [[C]]140    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[DEF]], [[C1]]141    ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY2]], [[AND]]142    ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[ADD]](s32), [[AND]]143    ; CHECK-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY [[ADD]](s32)144    ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[COPY3]], [[AND1]]145    ; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[ADD1]], [[ICMP]]146    ; CHECK-NEXT: [[COPY6:%[0-9]+]]:_(s32) = COPY [[ADD2]](s32)147    ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY]], [[COPY5]]148    ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY5]]149    ; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[COPY1]], [[COPY6]]150    ; CHECK-NEXT: [[SUB2:%[0-9]+]]:_(s32) = G_SUB [[SUB1]], [[ICMP1]]151    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[COPY]], [[COPY2]]152    ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(s32) = G_XOR [[COPY1]], [[COPY3]]153    ; CHECK-NEXT: [[XOR2:%[0-9]+]]:_(s32) = G_XOR [[COPY]], [[SUB]]154    ; CHECK-NEXT: [[XOR3:%[0-9]+]]:_(s32) = G_XOR [[COPY1]], [[SUB2]]155    ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[XOR]], [[XOR2]]156    ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[XOR1]], [[XOR3]]157    ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND2]](s32), [[C1]]158    ; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[AND3]](s32), [[C1]]159    ; CHECK-NEXT: [[ICMP4:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[AND3]](s32), [[C1]]160    ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP4]](s32), [[ICMP2]], [[ICMP3]]161    ; CHECK-NEXT: $x10 = COPY [[SUB]](s32)162    ; CHECK-NEXT: $x11 = COPY [[SUB2]](s32)163    ; CHECK-NEXT: $x12 = COPY [[SELECT]](s32)164    ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12165    %0:_(s32) = COPY $x10166    %1:_(s32) = COPY $x11167    %2:_(s64) = G_MERGE_VALUES %0(s32), %1(s32)168    %3:_(s32) = COPY $x12169    %4:_(s32) = COPY $x13170    %5:_(s64) = G_MERGE_VALUES %3(s32), %4(s32)171    %6:_(s32) = COPY $x14172    %7:_(s1)  = G_TRUNC %6(s32)173    %8:_(s64), %9:_(s1) = G_SSUBE %2, %5, %7174    %10:_(s32), %11:_(s32) = G_UNMERGE_VALUES %8(s64)175    %12:_(s32) = G_ANYEXT %9(s1)176    $x10 = COPY %10(s32)177    $x11 = COPY %11(s32)178    $x12 = COPY %12(s32)179    PseudoRET implicit $x10, implicit $x11, implicit $x12180...181