1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -mcpu=mips32r5 -mattr=+msa,+fp64,+nan2008 -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=P5600
4 define void @sdiv_v16i8(ptr %a, ptr %b, ptr %c) {
5 ; P5600-LABEL: sdiv_v16i8:
6 ; P5600: # %bb.0: # %entry
7 ; P5600-NEXT: ld.b $w0, 0($4)
8 ; P5600-NEXT: ld.b $w1, 0($5)
9 ; P5600-NEXT: div_s.b $w0, $w0, $w1
10 ; P5600-NEXT: st.b $w0, 0($6)
14 %0 = load <16 x i8>, ptr %a, align 16
15 %1 = load <16 x i8>, ptr %b, align 16
16 %div = sdiv <16 x i8> %0, %1
17 store <16 x i8> %div, ptr %c, align 16
21 define void @sdiv_v8i16(ptr %a, ptr %b, ptr %c) {
22 ; P5600-LABEL: sdiv_v8i16:
23 ; P5600: # %bb.0: # %entry
24 ; P5600-NEXT: ld.h $w0, 0($4)
25 ; P5600-NEXT: ld.h $w1, 0($5)
26 ; P5600-NEXT: div_s.h $w0, $w0, $w1
27 ; P5600-NEXT: st.h $w0, 0($6)
31 %0 = load <8 x i16>, ptr %a, align 16
32 %1 = load <8 x i16>, ptr %b, align 16
33 %div = sdiv <8 x i16> %0, %1
34 store <8 x i16> %div, ptr %c, align 16
38 define void @sdiv_v4i32(ptr %a, ptr %b, ptr %c) {
39 ; P5600-LABEL: sdiv_v4i32:
40 ; P5600: # %bb.0: # %entry
41 ; P5600-NEXT: ld.w $w0, 0($4)
42 ; P5600-NEXT: ld.w $w1, 0($5)
43 ; P5600-NEXT: div_s.w $w0, $w0, $w1
44 ; P5600-NEXT: st.w $w0, 0($6)
48 %0 = load <4 x i32>, ptr %a, align 16
49 %1 = load <4 x i32>, ptr %b, align 16
50 %div = sdiv <4 x i32> %0, %1
51 store <4 x i32> %div, ptr %c, align 16
55 define void @sdiv_v2i64(ptr %a, ptr %b, ptr %c) {
56 ; P5600-LABEL: sdiv_v2i64:
57 ; P5600: # %bb.0: # %entry
58 ; P5600-NEXT: ld.d $w0, 0($4)
59 ; P5600-NEXT: ld.d $w1, 0($5)
60 ; P5600-NEXT: div_s.d $w0, $w0, $w1
61 ; P5600-NEXT: st.d $w0, 0($6)
65 %0 = load <2 x i64>, ptr %a, align 16
66 %1 = load <2 x i64>, ptr %b, align 16
67 %div = sdiv <2 x i64> %0, %1
68 store <2 x i64> %div, ptr %c, align 16
72 define void @srem_v16i8(ptr %a, ptr %b, ptr %c) {
73 ; P5600-LABEL: srem_v16i8:
74 ; P5600: # %bb.0: # %entry
75 ; P5600-NEXT: ld.b $w0, 0($4)
76 ; P5600-NEXT: ld.b $w1, 0($5)
77 ; P5600-NEXT: mod_s.b $w0, $w0, $w1
78 ; P5600-NEXT: st.b $w0, 0($6)
82 %0 = load <16 x i8>, ptr %a, align 16
83 %1 = load <16 x i8>, ptr %b, align 16
84 %rem = srem <16 x i8> %0, %1
85 store <16 x i8> %rem, ptr %c, align 16
89 define void @srem_v8i16(ptr %a, ptr %b, ptr %c) {
90 ; P5600-LABEL: srem_v8i16:
91 ; P5600: # %bb.0: # %entry
92 ; P5600-NEXT: ld.h $w0, 0($4)
93 ; P5600-NEXT: ld.h $w1, 0($5)
94 ; P5600-NEXT: mod_s.h $w0, $w0, $w1
95 ; P5600-NEXT: st.h $w0, 0($6)
99 %0 = load <8 x i16>, ptr %a, align 16
100 %1 = load <8 x i16>, ptr %b, align 16
101 %rem = srem <8 x i16> %0, %1
102 store <8 x i16> %rem, ptr %c, align 16
106 define void @srem_v4i32(ptr %a, ptr %b, ptr %c) {
107 ; P5600-LABEL: srem_v4i32:
108 ; P5600: # %bb.0: # %entry
109 ; P5600-NEXT: ld.w $w0, 0($4)
110 ; P5600-NEXT: ld.w $w1, 0($5)
111 ; P5600-NEXT: mod_s.w $w0, $w0, $w1
112 ; P5600-NEXT: st.w $w0, 0($6)
116 %0 = load <4 x i32>, ptr %a, align 16
117 %1 = load <4 x i32>, ptr %b, align 16
118 %rem = srem <4 x i32> %0, %1
119 store <4 x i32> %rem, ptr %c, align 16
123 define void @srem_v2i64(ptr %a, ptr %b, ptr %c) {
124 ; P5600-LABEL: srem_v2i64:
125 ; P5600: # %bb.0: # %entry
126 ; P5600-NEXT: ld.d $w0, 0($4)
127 ; P5600-NEXT: ld.d $w1, 0($5)
128 ; P5600-NEXT: mod_s.d $w0, $w0, $w1
129 ; P5600-NEXT: st.d $w0, 0($6)
133 %0 = load <2 x i64>, ptr %a, align 16
134 %1 = load <2 x i64>, ptr %b, align 16
135 %rem = srem <2 x i64> %0, %1
136 store <2 x i64> %rem, ptr %c, align 16
140 define void @udiv_v16u8(ptr %a, ptr %b, ptr %c) {
141 ; P5600-LABEL: udiv_v16u8:
142 ; P5600: # %bb.0: # %entry
143 ; P5600-NEXT: ld.b $w0, 0($4)
144 ; P5600-NEXT: ld.b $w1, 0($5)
145 ; P5600-NEXT: div_u.b $w0, $w0, $w1
146 ; P5600-NEXT: st.b $w0, 0($6)
150 %0 = load <16 x i8>, ptr %a, align 16
151 %1 = load <16 x i8>, ptr %b, align 16
152 %div = udiv <16 x i8> %0, %1
153 store <16 x i8> %div, ptr %c, align 16
157 define void @udiv_v8u16(ptr %a, ptr %b, ptr %c) {
158 ; P5600-LABEL: udiv_v8u16:
159 ; P5600: # %bb.0: # %entry
160 ; P5600-NEXT: ld.h $w0, 0($4)
161 ; P5600-NEXT: ld.h $w1, 0($5)
162 ; P5600-NEXT: div_u.h $w0, $w0, $w1
163 ; P5600-NEXT: st.h $w0, 0($6)
167 %0 = load <8 x i16>, ptr %a, align 16
168 %1 = load <8 x i16>, ptr %b, align 16
169 %div = udiv <8 x i16> %0, %1
170 store <8 x i16> %div, ptr %c, align 16
174 define void @udiv_v4u32(ptr %a, ptr %b, ptr %c) {
175 ; P5600-LABEL: udiv_v4u32:
176 ; P5600: # %bb.0: # %entry
177 ; P5600-NEXT: ld.w $w0, 0($4)
178 ; P5600-NEXT: ld.w $w1, 0($5)
179 ; P5600-NEXT: div_u.w $w0, $w0, $w1
180 ; P5600-NEXT: st.w $w0, 0($6)
184 %0 = load <4 x i32>, ptr %a, align 16
185 %1 = load <4 x i32>, ptr %b, align 16
186 %div = udiv <4 x i32> %0, %1
187 store <4 x i32> %div, ptr %c, align 16
191 define void @udiv_v2u64(ptr %a, ptr %b, ptr %c) {
192 ; P5600-LABEL: udiv_v2u64:
193 ; P5600: # %bb.0: # %entry
194 ; P5600-NEXT: ld.d $w0, 0($4)
195 ; P5600-NEXT: ld.d $w1, 0($5)
196 ; P5600-NEXT: div_u.d $w0, $w0, $w1
197 ; P5600-NEXT: st.d $w0, 0($6)
201 %0 = load <2 x i64>, ptr %a, align 16
202 %1 = load <2 x i64>, ptr %b, align 16
203 %div = udiv <2 x i64> %0, %1
204 store <2 x i64> %div, ptr %c, align 16
208 define void @urem_v16u8(ptr %a, ptr %b, ptr %c) {
209 ; P5600-LABEL: urem_v16u8:
210 ; P5600: # %bb.0: # %entry
211 ; P5600-NEXT: ld.b $w0, 0($4)
212 ; P5600-NEXT: ld.b $w1, 0($5)
213 ; P5600-NEXT: mod_u.b $w0, $w0, $w1
214 ; P5600-NEXT: st.b $w0, 0($6)
218 %0 = load <16 x i8>, ptr %a, align 16
219 %1 = load <16 x i8>, ptr %b, align 16
220 %rem = urem <16 x i8> %0, %1
221 store <16 x i8> %rem, ptr %c, align 16
225 define void @urem_v8u16(ptr %a, ptr %b, ptr %c) {
226 ; P5600-LABEL: urem_v8u16:
227 ; P5600: # %bb.0: # %entry
228 ; P5600-NEXT: ld.h $w0, 0($4)
229 ; P5600-NEXT: ld.h $w1, 0($5)
230 ; P5600-NEXT: mod_u.h $w0, $w0, $w1
231 ; P5600-NEXT: st.h $w0, 0($6)
235 %0 = load <8 x i16>, ptr %a, align 16
236 %1 = load <8 x i16>, ptr %b, align 16
237 %rem = urem <8 x i16> %0, %1
238 store <8 x i16> %rem, ptr %c, align 16
242 define void @urem_v4u32(ptr %a, ptr %b, ptr %c) {
243 ; P5600-LABEL: urem_v4u32:
244 ; P5600: # %bb.0: # %entry
245 ; P5600-NEXT: ld.w $w0, 0($4)
246 ; P5600-NEXT: ld.w $w1, 0($5)
247 ; P5600-NEXT: mod_u.w $w0, $w0, $w1
248 ; P5600-NEXT: st.w $w0, 0($6)
252 %0 = load <4 x i32>, ptr %a, align 16
253 %1 = load <4 x i32>, ptr %b, align 16
254 %rem = urem <4 x i32> %0, %1
255 store <4 x i32> %rem, ptr %c, align 16
259 define void @urem_v2u64(ptr %a, ptr %b, ptr %c) {
260 ; P5600-LABEL: urem_v2u64:
261 ; P5600: # %bb.0: # %entry
262 ; P5600-NEXT: ld.d $w0, 0($4)
263 ; P5600-NEXT: ld.d $w1, 0($5)
264 ; P5600-NEXT: mod_u.d $w0, $w0, $w1
265 ; P5600-NEXT: st.d $w0, 0($6)
269 %0 = load <2 x i64>, ptr %a, align 16
270 %1 = load <2 x i64>, ptr %b, align 16
271 %rem = urem <2 x i64> %0, %1
272 store <2 x i64> %rem, ptr %c, align 16