brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.3 KiB · 70de06b Raw
162 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=riscv32 -run-pass=legalizer %s -o - \3# RUN: | FileCheck %s4---5name:            mul_i76body:             |7  bb.0.entry:8    ; CHECK-LABEL: name: mul_i79    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x1010    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1111    ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x212    ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)13    ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)14    ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__mulsi3, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit-def $x1015    ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x216    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x1017    ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)18    ; CHECK-NEXT: PseudoRET implicit $x1019    %0:_(s32) = COPY $x1020    %1:_(s32) = COPY $x1121    %2:_(s7) = G_TRUNC %0(s32)22    %3:_(s7) = G_TRUNC %1(s32)23    %4:_(s7) = G_MUL %2, %324    %5:_(s32) = G_ANYEXT %4(s7)25    $x10 = COPY %5(s32)26    PseudoRET implicit $x1027 28...29---30name:            mul_i831body:             |32  bb.0.entry:33    ; CHECK-LABEL: name: mul_i834    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x1035    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1136    ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x237    ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)38    ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)39    ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__mulsi3, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit-def $x1040    ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x241    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x1042    ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)43    ; CHECK-NEXT: PseudoRET implicit $x1044    %0:_(s32) = COPY $x1045    %1:_(s32) = COPY $x1146    %2:_(s8) = G_TRUNC %0(s32)47    %3:_(s8) = G_TRUNC %1(s32)48    %4:_(s8) = G_MUL %2, %349    %5:_(s32) = G_ANYEXT %4(s8)50    $x10 = COPY %5(s32)51    PseudoRET implicit $x1052 53...54---55name:            mul_i1656body:             |57  bb.0.entry:58    ; CHECK-LABEL: name: mul_i1659    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x1060    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1161    ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x262    ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)63    ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)64    ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__mulsi3, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit-def $x1065    ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x266    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x1067    ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)68    ; CHECK-NEXT: PseudoRET implicit $x1069    %0:_(s32) = COPY $x1070    %1:_(s32) = COPY $x1171    %2:_(s16) = G_TRUNC %0(s32)72    %3:_(s16) = G_TRUNC %1(s32)73    %4:_(s16) = G_MUL %2, %374    %5:_(s32) = G_ANYEXT %4(s16)75    $x10 = COPY %5(s32)76    PseudoRET implicit $x1077 78...79---80name:            mul_i3281body:             |82  bb.0.entry:83    ; CHECK-LABEL: name: mul_i3284    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x1085    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1186    ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x287    ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)88    ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)89    ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__mulsi3, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit-def $x1090    ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x291    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x1092    ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)93    ; CHECK-NEXT: PseudoRET implicit $x1094    %0:_(s32) = COPY $x1095    %1:_(s32) = COPY $x1196    %2:_(s32) = G_MUL %0, %197    $x10 = COPY %2(s32)98    PseudoRET implicit $x1099 100...101---102name:            mul_i64103body:             |104  bb.0.entry:105    ; CHECK-LABEL: name: mul_i64106    ; CHECK: %lo1:_(s32) = COPY $x10107    ; CHECK-NEXT: %hi1:_(s32) = COPY $x11108    ; CHECK-NEXT: %lo2:_(s32) = COPY $x12109    ; CHECK-NEXT: %hi2:_(s32) = COPY $x13110    ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2111    ; CHECK-NEXT: $x10 = COPY %lo1(s32)112    ; CHECK-NEXT: $x11 = COPY %hi1(s32)113    ; CHECK-NEXT: $x12 = COPY %lo2(s32)114    ; CHECK-NEXT: $x13 = COPY %hi2(s32)115    ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__muldi3, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit $x12, implicit $x13, implicit-def $x10, implicit-def $x11116    ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2117    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10118    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11119    ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)120    ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)121    ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11122    %lo1:_(s32) = COPY $x10123    %hi1:_(s32) = COPY $x11124    %lo2:_(s32) = COPY $x12125    %hi2:_(s32) = COPY $x13126    %x1:_(s64) = G_MERGE_VALUES %lo1(s32), %hi1(s32)127    %x2:_(s64) = G_MERGE_VALUES %lo2(s32), %hi2(s32)128    %y:_(s64) = G_MUL %x1, %x2129    %loy:_(s32), %hiy:_(s32) = G_UNMERGE_VALUES %y(s64)130    $x10 = COPY %loy(s32)131    $x11 = COPY %hiy(s32)132    PseudoRET implicit $x10, implicit $x11133 134...135---136name:            smulh_i32137body:             |138  bb.0.entry:139    ; CHECK-LABEL: name: smulh_i32140    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x10141    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11142    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 31143    ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[COPY]], [[C]](s32)144    ; CHECK-NEXT: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[COPY1]], [[C]](s32)145    ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2146    ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)147    ; CHECK-NEXT: $x11 = COPY [[ASHR]](s32)148    ; CHECK-NEXT: $x12 = COPY [[COPY1]](s32)149    ; CHECK-NEXT: $x13 = COPY [[ASHR1]](s32)150    ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__muldi3, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit $x12, implicit $x13, implicit-def $x10, implicit-def $x11151    ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2152    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x11153    ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)154    ; CHECK-NEXT: PseudoRET implicit $x10155    %0:_(s32) = COPY $x10156    %1:_(s32) = COPY $x11157    %2:_(s32) = G_SMULH %0, %1158    $x10 = COPY %2(s32)159    PseudoRET implicit $x10160 161...162