1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=FP32
3 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -run-pass=legalizer -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}
20 tracksRegLiveness: true
25 ; FP32-LABEL: name: float_add
26 ; FP32: liveins: $f12, $f14
27 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
28 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY $f14
29 ; FP32: [[FADD:%[0-9]+]]:_(s32) = G_FADD [[COPY]], [[COPY1]]
30 ; FP32: $f0 = COPY [[FADD]](s32)
31 ; FP32: RetRA implicit $f0
32 ; FP64-LABEL: name: float_add
33 ; FP64: liveins: $f12, $f14
34 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
35 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY $f14
36 ; FP64: [[FADD:%[0-9]+]]:_(s32) = G_FADD [[COPY]], [[COPY1]]
37 ; FP64: $f0 = COPY [[FADD]](s32)
38 ; FP64: RetRA implicit $f0
41 %2:_(s32) = G_FADD %0, %1
49 tracksRegLiveness: true
54 ; FP32-LABEL: name: float_sub
55 ; FP32: liveins: $f12, $f14
56 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
57 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY $f14
58 ; FP32: [[FSUB:%[0-9]+]]:_(s32) = G_FSUB [[COPY]], [[COPY1]]
59 ; FP32: $f0 = COPY [[FSUB]](s32)
60 ; FP32: RetRA implicit $f0
61 ; FP64-LABEL: name: float_sub
62 ; FP64: liveins: $f12, $f14
63 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
64 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY $f14
65 ; FP64: [[FSUB:%[0-9]+]]:_(s32) = G_FSUB [[COPY]], [[COPY1]]
66 ; FP64: $f0 = COPY [[FSUB]](s32)
67 ; FP64: RetRA implicit $f0
70 %2:_(s32) = G_FSUB %0, %1
78 tracksRegLiveness: true
83 ; FP32-LABEL: name: float_mul
84 ; FP32: liveins: $f12, $f14
85 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
86 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY $f14
87 ; FP32: [[FMUL:%[0-9]+]]:_(s32) = G_FMUL [[COPY]], [[COPY1]]
88 ; FP32: $f0 = COPY [[FMUL]](s32)
89 ; FP32: RetRA implicit $f0
90 ; FP64-LABEL: name: float_mul
91 ; FP64: liveins: $f12, $f14
92 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
93 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY $f14
94 ; FP64: [[FMUL:%[0-9]+]]:_(s32) = G_FMUL [[COPY]], [[COPY1]]
95 ; FP64: $f0 = COPY [[FMUL]](s32)
96 ; FP64: RetRA implicit $f0
99 %2:_(s32) = G_FMUL %0, %1
107 tracksRegLiveness: true
112 ; FP32-LABEL: name: float_div
113 ; FP32: liveins: $f12, $f14
114 ; FP32: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
115 ; FP32: [[COPY1:%[0-9]+]]:_(s32) = COPY $f14
116 ; FP32: [[FDIV:%[0-9]+]]:_(s32) = G_FDIV [[COPY]], [[COPY1]]
117 ; FP32: $f0 = COPY [[FDIV]](s32)
118 ; FP32: RetRA implicit $f0
119 ; FP64-LABEL: name: float_div
120 ; FP64: liveins: $f12, $f14
121 ; FP64: [[COPY:%[0-9]+]]:_(s32) = COPY $f12
122 ; FP64: [[COPY1:%[0-9]+]]:_(s32) = COPY $f14
123 ; FP64: [[FDIV:%[0-9]+]]:_(s32) = G_FDIV [[COPY]], [[COPY1]]
124 ; FP64: $f0 = COPY [[FDIV]](s32)
125 ; FP64: RetRA implicit $f0
126 %0:_(s32) = COPY $f12
127 %1:_(s32) = COPY $f14
128 %2:_(s32) = G_FDIV %0, %1
136 tracksRegLiveness: true
141 ; FP32-LABEL: name: double_add
142 ; FP32: liveins: $d6, $d7
143 ; FP32: [[COPY:%[0-9]+]]:_(s64) = COPY $d6
144 ; FP32: [[COPY1:%[0-9]+]]:_(s64) = COPY $d7
145 ; FP32: [[FADD:%[0-9]+]]:_(s64) = G_FADD [[COPY]], [[COPY1]]
146 ; FP32: $d0 = COPY [[FADD]](s64)
147 ; FP32: RetRA implicit $d0
148 ; FP64-LABEL: name: double_add
149 ; FP64: liveins: $d6, $d7
150 ; FP64: [[COPY:%[0-9]+]]:_(s64) = COPY $d6
151 ; FP64: [[COPY1:%[0-9]+]]:_(s64) = COPY $d7
152 ; FP64: [[FADD:%[0-9]+]]:_(s64) = G_FADD [[COPY]], [[COPY1]]
153 ; FP64: $d0 = COPY [[FADD]](s64)
154 ; FP64: RetRA implicit $d0
157 %2:_(s64) = G_FADD %0, %1
165 tracksRegLiveness: true
170 ; FP32-LABEL: name: double_sub
171 ; FP32: liveins: $d6, $d7
172 ; FP32: [[COPY:%[0-9]+]]:_(s64) = COPY $d6
173 ; FP32: [[COPY1:%[0-9]+]]:_(s64) = COPY $d7
174 ; FP32: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[COPY]], [[COPY1]]
175 ; FP32: $d0 = COPY [[FSUB]](s64)
176 ; FP32: RetRA implicit $d0
177 ; FP64-LABEL: name: double_sub
178 ; FP64: liveins: $d6, $d7
179 ; FP64: [[COPY:%[0-9]+]]:_(s64) = COPY $d6
180 ; FP64: [[COPY1:%[0-9]+]]:_(s64) = COPY $d7
181 ; FP64: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[COPY]], [[COPY1]]
182 ; FP64: $d0 = COPY [[FSUB]](s64)
183 ; FP64: RetRA implicit $d0
186 %2:_(s64) = G_FSUB %0, %1
194 tracksRegLiveness: true
199 ; FP32-LABEL: name: double_mul
200 ; FP32: liveins: $d6, $d7
201 ; FP32: [[COPY:%[0-9]+]]:_(s64) = COPY $d6
202 ; FP32: [[COPY1:%[0-9]+]]:_(s64) = COPY $d7
203 ; FP32: [[FMUL:%[0-9]+]]:_(s64) = G_FMUL [[COPY]], [[COPY1]]
204 ; FP32: $d0 = COPY [[FMUL]](s64)
205 ; FP32: RetRA implicit $d0
206 ; FP64-LABEL: name: double_mul
207 ; FP64: liveins: $d6, $d7
208 ; FP64: [[COPY:%[0-9]+]]:_(s64) = COPY $d6
209 ; FP64: [[COPY1:%[0-9]+]]:_(s64) = COPY $d7
210 ; FP64: [[FMUL:%[0-9]+]]:_(s64) = G_FMUL [[COPY]], [[COPY1]]
211 ; FP64: $d0 = COPY [[FMUL]](s64)
212 ; FP64: RetRA implicit $d0
215 %2:_(s64) = G_FMUL %0, %1
223 tracksRegLiveness: true
228 ; FP32-LABEL: name: double_div
229 ; FP32: liveins: $d6, $d7
230 ; FP32: [[COPY:%[0-9]+]]:_(s64) = COPY $d6
231 ; FP32: [[COPY1:%[0-9]+]]:_(s64) = COPY $d7
232 ; FP32: [[FDIV:%[0-9]+]]:_(s64) = G_FDIV [[COPY]], [[COPY1]]
233 ; FP32: $d0 = COPY [[FDIV]](s64)
234 ; FP32: RetRA implicit $d0
235 ; FP64-LABEL: name: double_div
236 ; FP64: liveins: $d6, $d7
237 ; FP64: [[COPY:%[0-9]+]]:_(s64) = COPY $d6
238 ; FP64: [[COPY1:%[0-9]+]]:_(s64) = COPY $d7
239 ; FP64: [[FDIV:%[0-9]+]]:_(s64) = G_FDIV [[COPY]], [[COPY1]]
240 ; FP64: $d0 = COPY [[FDIV]](s64)
241 ; FP64: RetRA implicit $d0
244 %2:_(s64) = G_FDIV %0, %1