1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=hexagon < %s | FileCheck %s
4 define <128 x i8> @test0000(<128 x i8> %a0, i8 %a1) #0 {
5 ; CHECK-LABEL: test0000:
8 ; CHECK-NEXT: v1:0.uh = vzxt(v0.ub)
11 ; CHECK-NEXT: v0.h = vasl(v0.h,r0)
14 ; CHECK-NEXT: v1.h = vasl(v1.h,r0)
17 ; CHECK-NEXT: v0.b = vshuffe(v1.b,v0.b)
18 ; CHECK-NEXT: jumpr r31
20 %b0 = insertelement <128 x i8> zeroinitializer, i8 %a1, i32 0
21 %b1 = shufflevector <128 x i8> %b0, <128 x i8> undef, <128 x i32> zeroinitializer
22 %v0 = shl <128 x i8> %a0, %b1
26 define <128 x i8> @test0001(<128 x i8> %a0, i8 %a1) #0 {
27 ; CHECK-LABEL: test0001:
30 ; CHECK-NEXT: v1:0.h = vsxt(v0.b)
33 ; CHECK-NEXT: v0.h = vasr(v0.h,r0)
36 ; CHECK-NEXT: v1.h = vasr(v1.h,r0)
39 ; CHECK-NEXT: v0.b = vshuffe(v1.b,v0.b)
40 ; CHECK-NEXT: jumpr r31
42 %b0 = insertelement <128 x i8> zeroinitializer, i8 %a1, i32 0
43 %b1 = shufflevector <128 x i8> %b0, <128 x i8> undef, <128 x i32> zeroinitializer
44 %v0 = ashr <128 x i8> %a0, %b1
48 define <128 x i8> @test0002(<128 x i8> %a0, i8 %a1) #0 {
49 ; CHECK-LABEL: test0002:
52 ; CHECK-NEXT: v1:0.uh = vzxt(v0.ub)
55 ; CHECK-NEXT: v0.uh = vlsr(v0.uh,r0)
58 ; CHECK-NEXT: v1.uh = vlsr(v1.uh,r0)
61 ; CHECK-NEXT: v0.b = vshuffe(v1.b,v0.b)
62 ; CHECK-NEXT: jumpr r31
64 %b0 = insertelement <128 x i8> zeroinitializer, i8 %a1, i32 0
65 %b1 = shufflevector <128 x i8> %b0, <128 x i8> undef, <128 x i32> zeroinitializer
66 %v0 = lshr <128 x i8> %a0, %b1
70 define <64 x i16> @test0010(<64 x i16> %a0, i16 %a1) #0 {
71 ; CHECK-LABEL: test0010:
74 ; CHECK-NEXT: v0.h = vasl(v0.h,r0)
75 ; CHECK-NEXT: jumpr r31
77 %b0 = insertelement <64 x i16> zeroinitializer, i16 %a1, i32 0
78 %b1 = shufflevector <64 x i16> %b0, <64 x i16> undef, <64 x i32> zeroinitializer
79 %v0 = shl <64 x i16> %a0, %b1
83 define <64 x i16> @test0011(<64 x i16> %a0, i16 %a1) #0 {
84 ; CHECK-LABEL: test0011:
87 ; CHECK-NEXT: v0.h = vasr(v0.h,r0)
88 ; CHECK-NEXT: jumpr r31
90 %b0 = insertelement <64 x i16> zeroinitializer, i16 %a1, i32 0
91 %b1 = shufflevector <64 x i16> %b0, <64 x i16> undef, <64 x i32> zeroinitializer
92 %v0 = ashr <64 x i16> %a0, %b1
96 define <64 x i16> @test0012(<64 x i16> %a0, i16 %a1) #0 {
97 ; CHECK-LABEL: test0012:
100 ; CHECK-NEXT: v0.uh = vlsr(v0.uh,r0)
101 ; CHECK-NEXT: jumpr r31
103 %b0 = insertelement <64 x i16> zeroinitializer, i16 %a1, i32 0
104 %b1 = shufflevector <64 x i16> %b0, <64 x i16> undef, <64 x i32> zeroinitializer
105 %v0 = lshr <64 x i16> %a0, %b1
109 define <32 x i32> @test0020(<32 x i32> %a0, i32 %a1) #0 {
110 ; CHECK-LABEL: test0020:
113 ; CHECK-NEXT: v0.w = vasl(v0.w,r0)
114 ; CHECK-NEXT: jumpr r31
116 %b0 = insertelement <32 x i32> zeroinitializer, i32 %a1, i32 0
117 %b1 = shufflevector <32 x i32> %b0, <32 x i32> undef, <32 x i32> zeroinitializer
118 %v0 = shl <32 x i32> %a0, %b1
122 define <32 x i32> @test0021(<32 x i32> %a0, i32 %a1) #0 {
123 ; CHECK-LABEL: test0021:
126 ; CHECK-NEXT: v0.w = vasr(v0.w,r0)
127 ; CHECK-NEXT: jumpr r31
129 %b0 = insertelement <32 x i32> zeroinitializer, i32 %a1, i32 0
130 %b1 = shufflevector <32 x i32> %b0, <32 x i32> undef, <32 x i32> zeroinitializer
131 %v0 = ashr <32 x i32> %a0, %b1
135 define <32 x i32> @test0022(<32 x i32> %a0, i32 %a1) #0 {
136 ; CHECK-LABEL: test0022:
139 ; CHECK-NEXT: v0.uw = vlsr(v0.uw,r0)
140 ; CHECK-NEXT: jumpr r31
142 %b0 = insertelement <32 x i32> zeroinitializer, i32 %a1, i32 0
143 %b1 = shufflevector <32 x i32> %b0, <32 x i32> undef, <32 x i32> zeroinitializer
144 %v0 = lshr <32 x i32> %a0, %b1
148 define <32 x i32> @test0023(<32 x i32> %a0, <32 x i32> %a1, i32 %a2) #0 {
149 ; CHECK-LABEL: test0023:
152 ; CHECK-NEXT: v0.w += vasl(v1.w,r0)
153 ; CHECK-NEXT: jumpr r31
155 %b0 = insertelement <32 x i32> zeroinitializer, i32 %a2, i32 0
156 %b1 = shufflevector <32 x i32> %b0, <32 x i32> undef, <32 x i32> zeroinitializer
157 %v0 = shl <32 x i32> %a1, %b1
158 %v1 = add <32 x i32> %a0, %v0
162 define <32 x i32> @test0024(<32 x i32> %a0, <32 x i32> %a1, i32 %a2) #0 {
163 ; CHECK-LABEL: test0024:
166 ; CHECK-NEXT: v0.w += vasr(v1.w,r0)
167 ; CHECK-NEXT: jumpr r31
169 %b0 = insertelement <32 x i32> zeroinitializer, i32 %a2, i32 0
170 %b1 = shufflevector <32 x i32> %b0, <32 x i32> undef, <32 x i32> zeroinitializer
171 %v0 = ashr <32 x i32> %a1, %b1
172 %v1 = add <32 x i32> %a0, %v0
176 define <128 x i8> @test0030(<128 x i8> %a0, <128 x i8> %a1) #0 {
177 ; CHECK-LABEL: test0030:
180 ; CHECK-NEXT: v3:2.uh = vzxt(v0.ub)
181 ; CHECK-NEXT: v31:30.uh = vzxt(v1.ub)
184 ; CHECK-NEXT: v0.h = vasl(v2.h,v30.h)
187 ; CHECK-NEXT: v1.h = vasl(v3.h,v31.h)
190 ; CHECK-NEXT: v0.b = vshuffe(v1.b,v0.b)
191 ; CHECK-NEXT: jumpr r31
193 %v0 = shl <128 x i8> %a0, %a1
197 define <128 x i8> @test0031(<128 x i8> %a0, <128 x i8> %a1) #0 {
198 ; CHECK-LABEL: test0031:
201 ; CHECK-NEXT: v3:2.h = vsxt(v0.b)
202 ; CHECK-NEXT: v31:30.uh = vzxt(v1.ub)
205 ; CHECK-NEXT: v0.h = vasr(v2.h,v30.h)
208 ; CHECK-NEXT: v1.h = vasr(v3.h,v31.h)
211 ; CHECK-NEXT: v0.b = vshuffe(v1.b,v0.b)
212 ; CHECK-NEXT: jumpr r31
214 %v0 = ashr <128 x i8> %a0, %a1
218 define <128 x i8> @test0032(<128 x i8> %a0, <128 x i8> %a1) #0 {
219 ; CHECK-LABEL: test0032:
222 ; CHECK-NEXT: v3:2.uh = vzxt(v0.ub)
223 ; CHECK-NEXT: v31:30.uh = vzxt(v1.ub)
226 ; CHECK-NEXT: v0.h = vlsr(v2.h,v30.h)
229 ; CHECK-NEXT: v1.h = vlsr(v3.h,v31.h)
232 ; CHECK-NEXT: v0.b = vshuffe(v1.b,v0.b)
233 ; CHECK-NEXT: jumpr r31
235 %v0 = lshr <128 x i8> %a0, %a1
239 define <64 x i16> @test0040(<64 x i16> %a0, <64 x i16> %a1) #0 {
240 ; CHECK-LABEL: test0040:
243 ; CHECK-NEXT: v0.h = vasl(v0.h,v1.h)
244 ; CHECK-NEXT: jumpr r31
246 %v0 = shl <64 x i16> %a0, %a1
250 define <64 x i16> @test0041(<64 x i16> %a0, <64 x i16> %a1) #0 {
251 ; CHECK-LABEL: test0041:
254 ; CHECK-NEXT: v0.h = vasr(v0.h,v1.h)
255 ; CHECK-NEXT: jumpr r31
257 %v0 = ashr <64 x i16> %a0, %a1
261 define <64 x i16> @test0042(<64 x i16> %a0, <64 x i16> %a1) #0 {
262 ; CHECK-LABEL: test0042:
265 ; CHECK-NEXT: v0.h = vlsr(v0.h,v1.h)
266 ; CHECK-NEXT: jumpr r31
268 %v0 = lshr <64 x i16> %a0, %a1
272 define <32 x i32> @test0050(<32 x i32> %a0, <32 x i32> %a1) #0 {
273 ; CHECK-LABEL: test0050:
276 ; CHECK-NEXT: v0.w = vasl(v0.w,v1.w)
277 ; CHECK-NEXT: jumpr r31
279 %v0 = shl <32 x i32> %a0, %a1
283 define <32 x i32> @test0051(<32 x i32> %a0, <32 x i32> %a1) #0 {
284 ; CHECK-LABEL: test0051:
287 ; CHECK-NEXT: v0.w = vasr(v0.w,v1.w)
288 ; CHECK-NEXT: jumpr r31
290 %v0 = ashr <32 x i32> %a0, %a1
294 define <32 x i32> @test0052(<32 x i32> %a0, <32 x i32> %a1) #0 {
295 ; CHECK-LABEL: test0052:
298 ; CHECK-NEXT: v0.w = vlsr(v0.w,v1.w)
299 ; CHECK-NEXT: jumpr r31
301 %v0 = lshr <32 x i32> %a0, %a1
305 attributes #0 = { nounwind readnone "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length128b" }