1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=hexagon < %s | FileCheck %s
4 define <64 x i8> @test0000(<64 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 <64 x i8> zeroinitializer, i8 %a1, i32 0
21 %b1 = shufflevector <64 x i8> %b0, <64 x i8> undef, <64 x i32> zeroinitializer
22 %v0 = shl <64 x i8> %a0, %b1
26 define <64 x i8> @test0001(<64 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 <64 x i8> zeroinitializer, i8 %a1, i32 0
43 %b1 = shufflevector <64 x i8> %b0, <64 x i8> undef, <64 x i32> zeroinitializer
44 %v0 = ashr <64 x i8> %a0, %b1
48 define <64 x i8> @test0002(<64 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 <64 x i8> zeroinitializer, i8 %a1, i32 0
65 %b1 = shufflevector <64 x i8> %b0, <64 x i8> undef, <64 x i32> zeroinitializer
66 %v0 = lshr <64 x i8> %a0, %b1
70 define <32 x i16> @test0010(<32 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 <32 x i16> zeroinitializer, i16 %a1, i32 0
78 %b1 = shufflevector <32 x i16> %b0, <32 x i16> undef, <32 x i32> zeroinitializer
80 %v0 = shl <32 x i16> %a0, %b1
84 define <32 x i16> @test0011(<32 x i16> %a0, i16 %a1) #0 {
85 ; CHECK-LABEL: test0011:
88 ; CHECK-NEXT: v0.h = vasr(v0.h,r0)
89 ; CHECK-NEXT: jumpr r31
91 %b0 = insertelement <32 x i16> zeroinitializer, i16 %a1, i32 0
92 %b1 = shufflevector <32 x i16> %b0, <32 x i16> undef, <32 x i32> zeroinitializer
93 %v0 = ashr <32 x i16> %a0, %b1
97 define <32 x i16> @test0012(<32 x i16> %a0, i16 %a1) #0 {
98 ; CHECK-LABEL: test0012:
101 ; CHECK-NEXT: v0.uh = vlsr(v0.uh,r0)
102 ; CHECK-NEXT: jumpr r31
104 %b0 = insertelement <32 x i16> zeroinitializer, i16 %a1, i32 0
105 %b1 = shufflevector <32 x i16> %b0, <32 x i16> undef, <32 x i32> zeroinitializer
106 %v0 = lshr <32 x i16> %a0, %b1
110 define <16 x i32> @test0020(<16 x i32> %a0, i32 %a1) #0 {
111 ; CHECK-LABEL: test0020:
114 ; CHECK-NEXT: v0.w = vasl(v0.w,r0)
115 ; CHECK-NEXT: jumpr r31
117 %b0 = insertelement <16 x i32> zeroinitializer, i32 %a1, i32 0
118 %b1 = shufflevector <16 x i32> %b0, <16 x i32> undef, <16 x i32> zeroinitializer
119 %v0 = shl <16 x i32> %a0, %b1
123 define <16 x i32> @test0021(<16 x i32> %a0, i32 %a1) #0 {
124 ; CHECK-LABEL: test0021:
127 ; CHECK-NEXT: v0.w = vasr(v0.w,r0)
128 ; CHECK-NEXT: jumpr r31
130 %b0 = insertelement <16 x i32> zeroinitializer, i32 %a1, i32 0
131 %b1 = shufflevector <16 x i32> %b0, <16 x i32> undef, <16 x i32> zeroinitializer
132 %v0 = ashr <16 x i32> %a0, %b1
136 define <16 x i32> @test0022(<16 x i32> %a0, i32 %a1) #0 {
137 ; CHECK-LABEL: test0022:
140 ; CHECK-NEXT: v0.uw = vlsr(v0.uw,r0)
141 ; CHECK-NEXT: jumpr r31
143 %b0 = insertelement <16 x i32> zeroinitializer, i32 %a1, i32 0
144 %b1 = shufflevector <16 x i32> %b0, <16 x i32> undef, <16 x i32> zeroinitializer
145 %v0 = lshr <16 x i32> %a0, %b1
149 define <16 x i32> @test0023(<16 x i32> %a0, <16 x i32> %a1, i32 %a2) #0 {
150 ; CHECK-LABEL: test0023:
153 ; CHECK-NEXT: v0.w += vasl(v1.w,r0)
154 ; CHECK-NEXT: jumpr r31
156 %b0 = insertelement <16 x i32> zeroinitializer, i32 %a2, i32 0
157 %b1 = shufflevector <16 x i32> %b0, <16 x i32> undef, <16 x i32> zeroinitializer
158 %v0 = shl <16 x i32> %a1, %b1
159 %v1 = add <16 x i32> %a0, %v0
163 define <16 x i32> @test0024(<16 x i32> %a0, <16 x i32> %a1, i32 %a2) #0 {
164 ; CHECK-LABEL: test0024:
167 ; CHECK-NEXT: v0.w += vasr(v1.w,r0)
168 ; CHECK-NEXT: jumpr r31
170 %b0 = insertelement <16 x i32> zeroinitializer, i32 %a2, i32 0
171 %b1 = shufflevector <16 x i32> %b0, <16 x i32> undef, <16 x i32> zeroinitializer
172 %v0 = ashr <16 x i32> %a1, %b1
173 %v1 = add <16 x i32> %a0, %v0
177 define <64 x i8> @test0030(<64 x i8> %a0, <64 x i8> %a1) #0 {
178 ; CHECK-LABEL: test0030:
181 ; CHECK-NEXT: v3:2.uh = vzxt(v0.ub)
182 ; CHECK-NEXT: v31:30.uh = vzxt(v1.ub)
185 ; CHECK-NEXT: v0.h = vasl(v2.h,v30.h)
188 ; CHECK-NEXT: v1.h = vasl(v3.h,v31.h)
191 ; CHECK-NEXT: v0.b = vshuffe(v1.b,v0.b)
192 ; CHECK-NEXT: jumpr r31
194 %v0 = shl <64 x i8> %a0, %a1
198 define <64 x i8> @test0031(<64 x i8> %a0, <64 x i8> %a1) #0 {
199 ; CHECK-LABEL: test0031:
202 ; CHECK-NEXT: v3:2.h = vsxt(v0.b)
203 ; CHECK-NEXT: v31:30.uh = vzxt(v1.ub)
206 ; CHECK-NEXT: v0.h = vasr(v2.h,v30.h)
209 ; CHECK-NEXT: v1.h = vasr(v3.h,v31.h)
212 ; CHECK-NEXT: v0.b = vshuffe(v1.b,v0.b)
213 ; CHECK-NEXT: jumpr r31
215 %v0 = ashr <64 x i8> %a0, %a1
219 define <64 x i8> @test0032(<64 x i8> %a0, <64 x i8> %a1) #0 {
220 ; CHECK-LABEL: test0032:
223 ; CHECK-NEXT: v3:2.uh = vzxt(v0.ub)
224 ; CHECK-NEXT: v31:30.uh = vzxt(v1.ub)
227 ; CHECK-NEXT: v0.h = vlsr(v2.h,v30.h)
230 ; CHECK-NEXT: v1.h = vlsr(v3.h,v31.h)
233 ; CHECK-NEXT: v0.b = vshuffe(v1.b,v0.b)
234 ; CHECK-NEXT: jumpr r31
236 %v0 = lshr <64 x i8> %a0, %a1
240 define <32 x i16> @test0040(<32 x i16> %a0, <32 x i16> %a1) #0 {
241 ; CHECK-LABEL: test0040:
244 ; CHECK-NEXT: v0.h = vasl(v0.h,v1.h)
245 ; CHECK-NEXT: jumpr r31
247 %v0 = shl <32 x i16> %a0, %a1
251 define <32 x i16> @test0041(<32 x i16> %a0, <32 x i16> %a1) #0 {
252 ; CHECK-LABEL: test0041:
255 ; CHECK-NEXT: v0.h = vasr(v0.h,v1.h)
256 ; CHECK-NEXT: jumpr r31
258 %v0 = ashr <32 x i16> %a0, %a1
262 define <32 x i16> @test0042(<32 x i16> %a0, <32 x i16> %a1) #0 {
263 ; CHECK-LABEL: test0042:
266 ; CHECK-NEXT: v0.h = vlsr(v0.h,v1.h)
267 ; CHECK-NEXT: jumpr r31
269 %v0 = lshr <32 x i16> %a0, %a1
273 define <16 x i32> @test0050(<16 x i32> %a0, <16 x i32> %a1) #0 {
274 ; CHECK-LABEL: test0050:
277 ; CHECK-NEXT: v0.w = vasl(v0.w,v1.w)
278 ; CHECK-NEXT: jumpr r31
280 %v0 = shl <16 x i32> %a0, %a1
284 define <16 x i32> @test0051(<16 x i32> %a0, <16 x i32> %a1) #0 {
285 ; CHECK-LABEL: test0051:
288 ; CHECK-NEXT: v0.w = vasr(v0.w,v1.w)
289 ; CHECK-NEXT: jumpr r31
291 %v0 = ashr <16 x i32> %a0, %a1
295 define <16 x i32> @test0052(<16 x i32> %a0, <16 x i32> %a1) #0 {
296 ; CHECK-LABEL: test0052:
299 ; CHECK-NEXT: v0.w = vlsr(v0.w,v1.w)
300 ; CHECK-NEXT: jumpr r31
302 %v0 = lshr <16 x i32> %a0, %a1
306 attributes #0 = { nounwind readnone "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length64b" }