1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=FP32
3 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=FP64
7 define void @float_add() {entry: ret void}
8 define void @float_sub() {entry: ret void}
9 define void @float_mul() {entry: ret void}
10 define void @float_div() {entry: ret void}
11 define void @double_add() {entry: ret void}
12 define void @double_sub() {entry: ret void}
13 define void @double_mul() {entry: ret void}
14 define void @double_div() {entry: ret void}
21 tracksRegLiveness: true
26 ; FP32-LABEL: name: float_add
27 ; FP32: liveins: $f12, $f14
28 ; FP32: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
29 ; FP32: [[COPY1:%[0-9]+]]:fprb(s32) = COPY $f14
30 ; FP32: [[FADD:%[0-9]+]]:fprb(s32) = G_FADD [[COPY]], [[COPY1]]
31 ; FP32: $f0 = COPY [[FADD]](s32)
32 ; FP32: RetRA implicit $f0
33 ; FP64-LABEL: name: float_add
34 ; FP64: liveins: $f12, $f14
35 ; FP64: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
36 ; FP64: [[COPY1:%[0-9]+]]:fprb(s32) = COPY $f14
37 ; FP64: [[FADD:%[0-9]+]]:fprb(s32) = G_FADD [[COPY]], [[COPY1]]
38 ; FP64: $f0 = COPY [[FADD]](s32)
39 ; FP64: RetRA implicit $f0
42 %2:_(s32) = G_FADD %0, %1
51 tracksRegLiveness: true
56 ; FP32-LABEL: name: float_sub
57 ; FP32: liveins: $f12, $f14
58 ; FP32: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
59 ; FP32: [[COPY1:%[0-9]+]]:fprb(s32) = COPY $f14
60 ; FP32: [[FSUB:%[0-9]+]]:fprb(s32) = G_FSUB [[COPY]], [[COPY1]]
61 ; FP32: $f0 = COPY [[FSUB]](s32)
62 ; FP32: RetRA implicit $f0
63 ; FP64-LABEL: name: float_sub
64 ; FP64: liveins: $f12, $f14
65 ; FP64: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
66 ; FP64: [[COPY1:%[0-9]+]]:fprb(s32) = COPY $f14
67 ; FP64: [[FSUB:%[0-9]+]]:fprb(s32) = G_FSUB [[COPY]], [[COPY1]]
68 ; FP64: $f0 = COPY [[FSUB]](s32)
69 ; FP64: RetRA implicit $f0
72 %2:_(s32) = G_FSUB %0, %1
81 tracksRegLiveness: true
86 ; FP32-LABEL: name: float_mul
87 ; FP32: liveins: $f12, $f14
88 ; FP32: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
89 ; FP32: [[COPY1:%[0-9]+]]:fprb(s32) = COPY $f14
90 ; FP32: [[FMUL:%[0-9]+]]:fprb(s32) = G_FMUL [[COPY]], [[COPY1]]
91 ; FP32: $f0 = COPY [[FMUL]](s32)
92 ; FP32: RetRA implicit $f0
93 ; FP64-LABEL: name: float_mul
94 ; FP64: liveins: $f12, $f14
95 ; FP64: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
96 ; FP64: [[COPY1:%[0-9]+]]:fprb(s32) = COPY $f14
97 ; FP64: [[FMUL:%[0-9]+]]:fprb(s32) = G_FMUL [[COPY]], [[COPY1]]
98 ; FP64: $f0 = COPY [[FMUL]](s32)
99 ; FP64: RetRA implicit $f0
100 %0:_(s32) = COPY $f12
101 %1:_(s32) = COPY $f14
102 %2:_(s32) = G_FMUL %0, %1
111 tracksRegLiveness: true
116 ; FP32-LABEL: name: float_div
117 ; FP32: liveins: $f12, $f14
118 ; FP32: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
119 ; FP32: [[COPY1:%[0-9]+]]:fprb(s32) = COPY $f14
120 ; FP32: [[FDIV:%[0-9]+]]:fprb(s32) = G_FDIV [[COPY]], [[COPY1]]
121 ; FP32: $f0 = COPY [[FDIV]](s32)
122 ; FP32: RetRA implicit $f0
123 ; FP64-LABEL: name: float_div
124 ; FP64: liveins: $f12, $f14
125 ; FP64: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
126 ; FP64: [[COPY1:%[0-9]+]]:fprb(s32) = COPY $f14
127 ; FP64: [[FDIV:%[0-9]+]]:fprb(s32) = G_FDIV [[COPY]], [[COPY1]]
128 ; FP64: $f0 = COPY [[FDIV]](s32)
129 ; FP64: RetRA implicit $f0
130 %0:_(s32) = COPY $f12
131 %1:_(s32) = COPY $f14
132 %2:_(s32) = G_FDIV %0, %1
141 tracksRegLiveness: true
146 ; FP32-LABEL: name: double_add
147 ; FP32: liveins: $d6, $d7
148 ; FP32: [[COPY:%[0-9]+]]:fprb(s64) = COPY $d6
149 ; FP32: [[COPY1:%[0-9]+]]:fprb(s64) = COPY $d7
150 ; FP32: [[FADD:%[0-9]+]]:fprb(s64) = G_FADD [[COPY]], [[COPY1]]
151 ; FP32: $d0 = COPY [[FADD]](s64)
152 ; FP32: RetRA implicit $d0
153 ; FP64-LABEL: name: double_add
154 ; FP64: liveins: $d6, $d7
155 ; FP64: [[COPY:%[0-9]+]]:fprb(s64) = COPY $d6
156 ; FP64: [[COPY1:%[0-9]+]]:fprb(s64) = COPY $d7
157 ; FP64: [[FADD:%[0-9]+]]:fprb(s64) = G_FADD [[COPY]], [[COPY1]]
158 ; FP64: $d0 = COPY [[FADD]](s64)
159 ; FP64: RetRA implicit $d0
162 %2:_(s64) = G_FADD %0, %1
171 tracksRegLiveness: true
176 ; FP32-LABEL: name: double_sub
177 ; FP32: liveins: $d6, $d7
178 ; FP32: [[COPY:%[0-9]+]]:fprb(s64) = COPY $d6
179 ; FP32: [[COPY1:%[0-9]+]]:fprb(s64) = COPY $d7
180 ; FP32: [[FSUB:%[0-9]+]]:fprb(s64) = G_FSUB [[COPY]], [[COPY1]]
181 ; FP32: $d0 = COPY [[FSUB]](s64)
182 ; FP32: RetRA implicit $d0
183 ; FP64-LABEL: name: double_sub
184 ; FP64: liveins: $d6, $d7
185 ; FP64: [[COPY:%[0-9]+]]:fprb(s64) = COPY $d6
186 ; FP64: [[COPY1:%[0-9]+]]:fprb(s64) = COPY $d7
187 ; FP64: [[FSUB:%[0-9]+]]:fprb(s64) = G_FSUB [[COPY]], [[COPY1]]
188 ; FP64: $d0 = COPY [[FSUB]](s64)
189 ; FP64: RetRA implicit $d0
192 %2:_(s64) = G_FSUB %0, %1
201 tracksRegLiveness: true
206 ; FP32-LABEL: name: double_mul
207 ; FP32: liveins: $d6, $d7
208 ; FP32: [[COPY:%[0-9]+]]:fprb(s64) = COPY $d6
209 ; FP32: [[COPY1:%[0-9]+]]:fprb(s64) = COPY $d7
210 ; FP32: [[FMUL:%[0-9]+]]:fprb(s64) = G_FMUL [[COPY]], [[COPY1]]
211 ; FP32: $d0 = COPY [[FMUL]](s64)
212 ; FP32: RetRA implicit $d0
213 ; FP64-LABEL: name: double_mul
214 ; FP64: liveins: $d6, $d7
215 ; FP64: [[COPY:%[0-9]+]]:fprb(s64) = COPY $d6
216 ; FP64: [[COPY1:%[0-9]+]]:fprb(s64) = COPY $d7
217 ; FP64: [[FMUL:%[0-9]+]]:fprb(s64) = G_FMUL [[COPY]], [[COPY1]]
218 ; FP64: $d0 = COPY [[FMUL]](s64)
219 ; FP64: RetRA implicit $d0
222 %2:_(s64) = G_FMUL %0, %1
231 tracksRegLiveness: true
236 ; FP32-LABEL: name: double_div
237 ; FP32: liveins: $d6, $d7
238 ; FP32: [[COPY:%[0-9]+]]:fprb(s64) = COPY $d6
239 ; FP32: [[COPY1:%[0-9]+]]:fprb(s64) = COPY $d7
240 ; FP32: [[FDIV:%[0-9]+]]:fprb(s64) = G_FDIV [[COPY]], [[COPY1]]
241 ; FP32: $d0 = COPY [[FDIV]](s64)
242 ; FP32: RetRA implicit $d0
243 ; FP64-LABEL: name: double_div
244 ; FP64: liveins: $d6, $d7
245 ; FP64: [[COPY:%[0-9]+]]:fprb(s64) = COPY $d6
246 ; FP64: [[COPY1:%[0-9]+]]:fprb(s64) = COPY $d7
247 ; FP64: [[FDIV:%[0-9]+]]:fprb(s64) = G_FDIV [[COPY]], [[COPY1]]
248 ; FP64: $d0 = COPY [[FDIV]](s64)
249 ; FP64: RetRA implicit $d0
252 %2:_(s64) = G_FDIV %0, %1