1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
5 define void @sdiv_i32() {entry: ret void}
6 define void @srem_i32() {entry: ret void}
7 define void @udiv_i32() {entry: ret void}
8 define void @urem_i32() {entry: ret void}
16 tracksRegLiveness: true
21 ; MIPS32-LABEL: name: sdiv_i32
22 ; MIPS32: liveins: $a0, $a1
23 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
24 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
25 ; MIPS32: [[PseudoSDIV:%[0-9]+]]:acc64 = PseudoSDIV [[COPY1]], [[COPY]]
26 ; MIPS32: [[PseudoMFLO:%[0-9]+]]:gpr32 = PseudoMFLO [[PseudoSDIV]]
27 ; MIPS32: $v0 = COPY [[PseudoMFLO]]
28 ; MIPS32: RetRA implicit $v0
29 %0:gprb(s32) = COPY $a0
30 %1:gprb(s32) = COPY $a1
31 %2:gprb(s32) = G_SDIV %1, %0
41 tracksRegLiveness: true
46 ; MIPS32-LABEL: name: srem_i32
47 ; MIPS32: liveins: $a0, $a1
48 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
49 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
50 ; MIPS32: [[PseudoSDIV:%[0-9]+]]:acc64 = PseudoSDIV [[COPY1]], [[COPY]]
51 ; MIPS32: [[PseudoMFHI:%[0-9]+]]:gpr32 = PseudoMFHI [[PseudoSDIV]]
52 ; MIPS32: $v0 = COPY [[PseudoMFHI]]
53 ; MIPS32: RetRA implicit $v0
54 %0:gprb(s32) = COPY $a0
55 %1:gprb(s32) = COPY $a1
56 %2:gprb(s32) = G_SREM %1, %0
66 tracksRegLiveness: true
71 ; MIPS32-LABEL: name: udiv_i32
72 ; MIPS32: liveins: $a0, $a1
73 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
74 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
75 ; MIPS32: [[PseudoUDIV:%[0-9]+]]:acc64 = PseudoUDIV [[COPY1]], [[COPY]]
76 ; MIPS32: [[PseudoMFLO:%[0-9]+]]:gpr32 = PseudoMFLO [[PseudoUDIV]]
77 ; MIPS32: $v0 = COPY [[PseudoMFLO]]
78 ; MIPS32: RetRA implicit $v0
79 %0:gprb(s32) = COPY $a0
80 %1:gprb(s32) = COPY $a1
81 %2:gprb(s32) = G_UDIV %1, %0
91 tracksRegLiveness: true
96 ; MIPS32-LABEL: name: urem_i32
97 ; MIPS32: liveins: $a0, $a1
98 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
99 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
100 ; MIPS32: [[PseudoUDIV:%[0-9]+]]:acc64 = PseudoUDIV [[COPY1]], [[COPY]]
101 ; MIPS32: [[PseudoMFHI:%[0-9]+]]:gpr32 = PseudoMFHI [[PseudoUDIV]]
102 ; MIPS32: $v0 = COPY [[PseudoMFHI]]
103 ; MIPS32: RetRA implicit $v0
104 %0:gprb(s32) = COPY $a0
105 %1:gprb(s32) = COPY $a1
106 %2:gprb(s32) = G_UREM %1, %0