73 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS323--- |4 5 define void @mul_i32(i32 %x, i32 %y) {entry: ret void}6 define void @umul_with_overflow(i32 %lhs, i32 %rhs, ptr %pmul, ptr %pcarry_flag) { ret void }7 8...9---10name: mul_i3211alignment: 412legalized: true13tracksRegLiveness: true14body: |15 bb.0.entry:16 liveins: $a0, $a117 18 ; MIPS32-LABEL: name: mul_i3219 ; MIPS32: liveins: $a0, $a120 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a021 ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a122 ; MIPS32: [[MUL:%[0-9]+]]:gprb(s32) = G_MUL [[COPY]], [[COPY1]]23 ; MIPS32: $v0 = COPY [[MUL]](s32)24 ; MIPS32: RetRA implicit $v025 %0:_(s32) = COPY $a026 %1:_(s32) = COPY $a127 %2:_(s32) = G_MUL %0, %128 $v0 = COPY %2(s32)29 RetRA implicit $v030 31...32---33name: umul_with_overflow34alignment: 435legalized: true36tracksRegLiveness: true37body: |38 bb.1 (%ir-block.0):39 liveins: $a0, $a1, $a2, $a340 41 ; MIPS32-LABEL: name: umul_with_overflow42 ; MIPS32: liveins: $a0, $a1, $a2, $a343 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a044 ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a145 ; MIPS32: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a246 ; MIPS32: [[COPY3:%[0-9]+]]:gprb(p0) = COPY $a347 ; MIPS32: [[MUL:%[0-9]+]]:gprb(s32) = G_MUL [[COPY]], [[COPY1]]48 ; MIPS32: [[UMULH:%[0-9]+]]:gprb(s32) = G_UMULH [[COPY]], [[COPY1]]49 ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 050 ; MIPS32: [[ICMP:%[0-9]+]]:gprb(s32) = G_ICMP intpred(ne), [[UMULH]](s32), [[C]]51 ; MIPS32: [[C1:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 152 ; MIPS32: [[COPY4:%[0-9]+]]:gprb(s32) = COPY [[ICMP]](s32)53 ; MIPS32: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[COPY4]], [[C1]]54 ; MIPS32: G_STORE [[AND]](s32), [[COPY3]](p0) :: (store (s8) into %ir.pcarry_flag)55 ; MIPS32: G_STORE [[MUL]](s32), [[COPY2]](p0) :: (store (s32) into %ir.pmul)56 ; MIPS32: RetRA57 %0:_(s32) = COPY $a058 %1:_(s32) = COPY $a159 %2:_(p0) = COPY $a260 %3:_(p0) = COPY $a361 %4:_(s32) = G_MUL %0, %162 %7:_(s32) = G_UMULH %0, %163 %8:_(s32) = G_CONSTANT i32 064 %9:_(s32) = G_ICMP intpred(ne), %7(s32), %865 %10:_(s32) = G_CONSTANT i32 166 %11:_(s32) = COPY %9(s32)67 %6:_(s32) = G_AND %11, %1068 G_STORE %6(s32), %3(p0) :: (store (s8) into %ir.pcarry_flag)69 G_STORE %4(s32), %2(p0) :: (store (s32) into %ir.pmul)70 RetRA71 72...73