1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=mipsel-linux-gnu -mcpu=mips32r5 -mattr=+msa,+fp64,+nan2008 -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=P5600
5 define void @fadd_v4f32(ptr %a, ptr %b, ptr %c) { entry: ret void }
6 define void @fadd_v2f64(ptr %a, ptr %b, ptr %c) { entry: ret void }
8 define void @fsub_v4f32(ptr %a, ptr %b, ptr %c) { entry: ret void }
9 define void @fsub_v2f64(ptr %a, ptr %b, ptr %c) { entry: ret void }
11 define void @fmul_v4f32(ptr %a, ptr %b, ptr %c) { entry: ret void }
12 define void @fmul_v2f64(ptr %a, ptr %b, ptr %c) { entry: ret void }
14 define void @fdiv_v4f32(ptr %a, ptr %b, ptr %c) { entry: ret void }
15 define void @fdiv_v2f64(ptr %a, ptr %b, ptr %c) { entry: ret void }
22 tracksRegLiveness: true
25 liveins: $a0, $a1, $a2
27 ; P5600-LABEL: name: fadd_v4f32
28 ; P5600: liveins: $a0, $a1, $a2
29 ; P5600: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a0
30 ; P5600: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1
31 ; P5600: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a2
32 ; P5600: [[LOAD:%[0-9]+]]:fprb(<4 x s32>) = G_LOAD [[COPY]](p0) :: (load (<4 x s32>) from %ir.a)
33 ; P5600: [[LOAD1:%[0-9]+]]:fprb(<4 x s32>) = G_LOAD [[COPY1]](p0) :: (load (<4 x s32>) from %ir.b)
34 ; P5600: [[FADD:%[0-9]+]]:fprb(<4 x s32>) = G_FADD [[LOAD]], [[LOAD1]]
35 ; P5600: G_STORE [[FADD]](<4 x s32>), [[COPY2]](p0) :: (store (<4 x s32>) into %ir.c)
40 %3:_(<4 x s32>) = G_LOAD %0(p0) :: (load (<4 x s32>) from %ir.a)
41 %4:_(<4 x s32>) = G_LOAD %1(p0) :: (load (<4 x s32>) from %ir.b)
42 %5:_(<4 x s32>) = G_FADD %3, %4
43 G_STORE %5(<4 x s32>), %2(p0) :: (store (<4 x s32>) into %ir.c)
51 tracksRegLiveness: true
54 liveins: $a0, $a1, $a2
56 ; P5600-LABEL: name: fadd_v2f64
57 ; P5600: liveins: $a0, $a1, $a2
58 ; P5600: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a0
59 ; P5600: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1
60 ; P5600: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a2
61 ; P5600: [[LOAD:%[0-9]+]]:fprb(<2 x s64>) = G_LOAD [[COPY]](p0) :: (load (<2 x s64>) from %ir.a)
62 ; P5600: [[LOAD1:%[0-9]+]]:fprb(<2 x s64>) = G_LOAD [[COPY1]](p0) :: (load (<2 x s64>) from %ir.b)
63 ; P5600: [[FADD:%[0-9]+]]:fprb(<2 x s64>) = G_FADD [[LOAD]], [[LOAD1]]
64 ; P5600: G_STORE [[FADD]](<2 x s64>), [[COPY2]](p0) :: (store (<2 x s64>) into %ir.c)
69 %3:_(<2 x s64>) = G_LOAD %0(p0) :: (load (<2 x s64>) from %ir.a)
70 %4:_(<2 x s64>) = G_LOAD %1(p0) :: (load (<2 x s64>) from %ir.b)
71 %5:_(<2 x s64>) = G_FADD %3, %4
72 G_STORE %5(<2 x s64>), %2(p0) :: (store (<2 x s64>) into %ir.c)
80 tracksRegLiveness: true
83 liveins: $a0, $a1, $a2
85 ; P5600-LABEL: name: fsub_v4f32
86 ; P5600: liveins: $a0, $a1, $a2
87 ; P5600: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a0
88 ; P5600: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1
89 ; P5600: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a2
90 ; P5600: [[LOAD:%[0-9]+]]:fprb(<4 x s32>) = G_LOAD [[COPY]](p0) :: (load (<4 x s32>) from %ir.a)
91 ; P5600: [[LOAD1:%[0-9]+]]:fprb(<4 x s32>) = G_LOAD [[COPY1]](p0) :: (load (<4 x s32>) from %ir.b)
92 ; P5600: [[FSUB:%[0-9]+]]:fprb(<4 x s32>) = G_FSUB [[LOAD]], [[LOAD1]]
93 ; P5600: G_STORE [[FSUB]](<4 x s32>), [[COPY2]](p0) :: (store (<4 x s32>) into %ir.c)
98 %3:_(<4 x s32>) = G_LOAD %0(p0) :: (load (<4 x s32>) from %ir.a)
99 %4:_(<4 x s32>) = G_LOAD %1(p0) :: (load (<4 x s32>) from %ir.b)
100 %5:_(<4 x s32>) = G_FSUB %3, %4
101 G_STORE %5(<4 x s32>), %2(p0) :: (store (<4 x s32>) into %ir.c)
109 tracksRegLiveness: true
112 liveins: $a0, $a1, $a2
114 ; P5600-LABEL: name: fsub_v2f64
115 ; P5600: liveins: $a0, $a1, $a2
116 ; P5600: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a0
117 ; P5600: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1
118 ; P5600: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a2
119 ; P5600: [[LOAD:%[0-9]+]]:fprb(<2 x s64>) = G_LOAD [[COPY]](p0) :: (load (<2 x s64>) from %ir.a)
120 ; P5600: [[LOAD1:%[0-9]+]]:fprb(<2 x s64>) = G_LOAD [[COPY1]](p0) :: (load (<2 x s64>) from %ir.b)
121 ; P5600: [[FSUB:%[0-9]+]]:fprb(<2 x s64>) = G_FSUB [[LOAD]], [[LOAD1]]
122 ; P5600: G_STORE [[FSUB]](<2 x s64>), [[COPY2]](p0) :: (store (<2 x s64>) into %ir.c)
127 %3:_(<2 x s64>) = G_LOAD %0(p0) :: (load (<2 x s64>) from %ir.a)
128 %4:_(<2 x s64>) = G_LOAD %1(p0) :: (load (<2 x s64>) from %ir.b)
129 %5:_(<2 x s64>) = G_FSUB %3, %4
130 G_STORE %5(<2 x s64>), %2(p0) :: (store (<2 x s64>) into %ir.c)
138 tracksRegLiveness: true
141 liveins: $a0, $a1, $a2
143 ; P5600-LABEL: name: fmul_v4f32
144 ; P5600: liveins: $a0, $a1, $a2
145 ; P5600: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a0
146 ; P5600: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1
147 ; P5600: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a2
148 ; P5600: [[LOAD:%[0-9]+]]:fprb(<4 x s32>) = G_LOAD [[COPY]](p0) :: (load (<4 x s32>) from %ir.a)
149 ; P5600: [[LOAD1:%[0-9]+]]:fprb(<4 x s32>) = G_LOAD [[COPY1]](p0) :: (load (<4 x s32>) from %ir.b)
150 ; P5600: [[FMUL:%[0-9]+]]:fprb(<4 x s32>) = G_FMUL [[LOAD]], [[LOAD1]]
151 ; P5600: G_STORE [[FMUL]](<4 x s32>), [[COPY2]](p0) :: (store (<4 x s32>) into %ir.c)
156 %3:_(<4 x s32>) = G_LOAD %0(p0) :: (load (<4 x s32>) from %ir.a)
157 %4:_(<4 x s32>) = G_LOAD %1(p0) :: (load (<4 x s32>) from %ir.b)
158 %5:_(<4 x s32>) = G_FMUL %3, %4
159 G_STORE %5(<4 x s32>), %2(p0) :: (store (<4 x s32>) into %ir.c)
167 tracksRegLiveness: true
170 liveins: $a0, $a1, $a2
172 ; P5600-LABEL: name: fmul_v2f64
173 ; P5600: liveins: $a0, $a1, $a2
174 ; P5600: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a0
175 ; P5600: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1
176 ; P5600: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a2
177 ; P5600: [[LOAD:%[0-9]+]]:fprb(<2 x s64>) = G_LOAD [[COPY]](p0) :: (load (<2 x s64>) from %ir.a)
178 ; P5600: [[LOAD1:%[0-9]+]]:fprb(<2 x s64>) = G_LOAD [[COPY1]](p0) :: (load (<2 x s64>) from %ir.b)
179 ; P5600: [[FMUL:%[0-9]+]]:fprb(<2 x s64>) = G_FMUL [[LOAD]], [[LOAD1]]
180 ; P5600: G_STORE [[FMUL]](<2 x s64>), [[COPY2]](p0) :: (store (<2 x s64>) into %ir.c)
185 %3:_(<2 x s64>) = G_LOAD %0(p0) :: (load (<2 x s64>) from %ir.a)
186 %4:_(<2 x s64>) = G_LOAD %1(p0) :: (load (<2 x s64>) from %ir.b)
187 %5:_(<2 x s64>) = G_FMUL %3, %4
188 G_STORE %5(<2 x s64>), %2(p0) :: (store (<2 x s64>) into %ir.c)
196 tracksRegLiveness: true
199 liveins: $a0, $a1, $a2
201 ; P5600-LABEL: name: fdiv_v4f32
202 ; P5600: liveins: $a0, $a1, $a2
203 ; P5600: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a0
204 ; P5600: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1
205 ; P5600: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a2
206 ; P5600: [[LOAD:%[0-9]+]]:fprb(<4 x s32>) = G_LOAD [[COPY]](p0) :: (load (<4 x s32>) from %ir.a)
207 ; P5600: [[LOAD1:%[0-9]+]]:fprb(<4 x s32>) = G_LOAD [[COPY1]](p0) :: (load (<4 x s32>) from %ir.b)
208 ; P5600: [[FDIV:%[0-9]+]]:fprb(<4 x s32>) = G_FDIV [[LOAD]], [[LOAD1]]
209 ; P5600: G_STORE [[FDIV]](<4 x s32>), [[COPY2]](p0) :: (store (<4 x s32>) into %ir.c)
214 %3:_(<4 x s32>) = G_LOAD %0(p0) :: (load (<4 x s32>) from %ir.a)
215 %4:_(<4 x s32>) = G_LOAD %1(p0) :: (load (<4 x s32>) from %ir.b)
216 %5:_(<4 x s32>) = G_FDIV %3, %4
217 G_STORE %5(<4 x s32>), %2(p0) :: (store (<4 x s32>) into %ir.c)
225 tracksRegLiveness: true
228 liveins: $a0, $a1, $a2
230 ; P5600-LABEL: name: fdiv_v2f64
231 ; P5600: liveins: $a0, $a1, $a2
232 ; P5600: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a0
233 ; P5600: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1
234 ; P5600: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a2
235 ; P5600: [[LOAD:%[0-9]+]]:fprb(<2 x s64>) = G_LOAD [[COPY]](p0) :: (load (<2 x s64>) from %ir.a)
236 ; P5600: [[LOAD1:%[0-9]+]]:fprb(<2 x s64>) = G_LOAD [[COPY1]](p0) :: (load (<2 x s64>) from %ir.b)
237 ; P5600: [[FDIV:%[0-9]+]]:fprb(<2 x s64>) = G_FDIV [[LOAD]], [[LOAD1]]
238 ; P5600: G_STORE [[FDIV]](<2 x s64>), [[COPY2]](p0) :: (store (<2 x s64>) into %ir.c)
243 %3:_(<2 x s64>) = G_LOAD %0(p0) :: (load (<2 x s64>) from %ir.a)
244 %4:_(<2 x s64>) = G_LOAD %1(p0) :: (load (<2 x s64>) from %ir.b)
245 %5:_(<2 x s64>) = G_FDIV %3, %4
246 G_STORE %5(<2 x s64>), %2(p0) :: (store (<2 x s64>) into %ir.c)