1 ; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - | FileCheck %s
3 define <8 x i8> @vqshrns8(<8 x i16>* %A) nounwind {
4 ;CHECK-LABEL: vqshrns8:
6 %tmp1 = load <8 x i16>, <8 x i16>* %A
7 %tmp2 = call <8 x i8> @llvm.arm.neon.vqshiftns.v8i8(<8 x i16> %tmp1, <8 x i16> < i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8 >)
11 define <4 x i16> @vqshrns16(<4 x i32>* %A) nounwind {
12 ;CHECK-LABEL: vqshrns16:
14 %tmp1 = load <4 x i32>, <4 x i32>* %A
15 %tmp2 = call <4 x i16> @llvm.arm.neon.vqshiftns.v4i16(<4 x i32> %tmp1, <4 x i32> < i32 -16, i32 -16, i32 -16, i32 -16 >)
19 define <2 x i32> @vqshrns32(<2 x i64>* %A) nounwind {
20 ;CHECK-LABEL: vqshrns32:
22 %tmp1 = load <2 x i64>, <2 x i64>* %A
23 %tmp2 = call <2 x i32> @llvm.arm.neon.vqshiftns.v2i32(<2 x i64> %tmp1, <2 x i64> < i64 -32, i64 -32 >)
27 define <8 x i8> @vqshrnu8(<8 x i16>* %A) nounwind {
28 ;CHECK-LABEL: vqshrnu8:
30 %tmp1 = load <8 x i16>, <8 x i16>* %A
31 %tmp2 = call <8 x i8> @llvm.arm.neon.vqshiftnu.v8i8(<8 x i16> %tmp1, <8 x i16> < i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8 >)
35 define <4 x i16> @vqshrnu16(<4 x i32>* %A) nounwind {
36 ;CHECK-LABEL: vqshrnu16:
38 %tmp1 = load <4 x i32>, <4 x i32>* %A
39 %tmp2 = call <4 x i16> @llvm.arm.neon.vqshiftnu.v4i16(<4 x i32> %tmp1, <4 x i32> < i32 -16, i32 -16, i32 -16, i32 -16 >)
43 define <2 x i32> @vqshrnu32(<2 x i64>* %A) nounwind {
44 ;CHECK-LABEL: vqshrnu32:
46 %tmp1 = load <2 x i64>, <2 x i64>* %A
47 %tmp2 = call <2 x i32> @llvm.arm.neon.vqshiftnu.v2i32(<2 x i64> %tmp1, <2 x i64> < i64 -32, i64 -32 >)
51 define <8 x i8> @vqshruns8(<8 x i16>* %A) nounwind {
52 ;CHECK-LABEL: vqshruns8:
54 %tmp1 = load <8 x i16>, <8 x i16>* %A
55 %tmp2 = call <8 x i8> @llvm.arm.neon.vqshiftnsu.v8i8(<8 x i16> %tmp1, <8 x i16> < i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8 >)
59 define <4 x i16> @vqshruns16(<4 x i32>* %A) nounwind {
60 ;CHECK-LABEL: vqshruns16:
62 %tmp1 = load <4 x i32>, <4 x i32>* %A
63 %tmp2 = call <4 x i16> @llvm.arm.neon.vqshiftnsu.v4i16(<4 x i32> %tmp1, <4 x i32> < i32 -16, i32 -16, i32 -16, i32 -16 >)
67 define <2 x i32> @vqshruns32(<2 x i64>* %A) nounwind {
68 ;CHECK-LABEL: vqshruns32:
70 %tmp1 = load <2 x i64>, <2 x i64>* %A
71 %tmp2 = call <2 x i32> @llvm.arm.neon.vqshiftnsu.v2i32(<2 x i64> %tmp1, <2 x i64> < i64 -32, i64 -32 >)
75 declare <8 x i8> @llvm.arm.neon.vqshiftns.v8i8(<8 x i16>, <8 x i16>) nounwind readnone
76 declare <4 x i16> @llvm.arm.neon.vqshiftns.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
77 declare <2 x i32> @llvm.arm.neon.vqshiftns.v2i32(<2 x i64>, <2 x i64>) nounwind readnone
79 declare <8 x i8> @llvm.arm.neon.vqshiftnu.v8i8(<8 x i16>, <8 x i16>) nounwind readnone
80 declare <4 x i16> @llvm.arm.neon.vqshiftnu.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
81 declare <2 x i32> @llvm.arm.neon.vqshiftnu.v2i32(<2 x i64>, <2 x i64>) nounwind readnone
83 declare <8 x i8> @llvm.arm.neon.vqshiftnsu.v8i8(<8 x i16>, <8 x i16>) nounwind readnone
84 declare <4 x i16> @llvm.arm.neon.vqshiftnsu.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
85 declare <2 x i32> @llvm.arm.neon.vqshiftnsu.v2i32(<2 x i64>, <2 x i64>) nounwind readnone
87 define <8 x i8> @vqrshrns8(<8 x i16>* %A) nounwind {
88 ;CHECK-LABEL: vqrshrns8:
90 %tmp1 = load <8 x i16>, <8 x i16>* %A
91 %tmp2 = call <8 x i8> @llvm.arm.neon.vqrshiftns.v8i8(<8 x i16> %tmp1, <8 x i16> < i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8 >)
95 define <4 x i16> @vqrshrns16(<4 x i32>* %A) nounwind {
96 ;CHECK-LABEL: vqrshrns16:
98 %tmp1 = load <4 x i32>, <4 x i32>* %A
99 %tmp2 = call <4 x i16> @llvm.arm.neon.vqrshiftns.v4i16(<4 x i32> %tmp1, <4 x i32> < i32 -16, i32 -16, i32 -16, i32 -16 >)
103 define <2 x i32> @vqrshrns32(<2 x i64>* %A) nounwind {
104 ;CHECK-LABEL: vqrshrns32:
106 %tmp1 = load <2 x i64>, <2 x i64>* %A
107 %tmp2 = call <2 x i32> @llvm.arm.neon.vqrshiftns.v2i32(<2 x i64> %tmp1, <2 x i64> < i64 -32, i64 -32 >)
111 define <8 x i8> @vqrshrnu8(<8 x i16>* %A) nounwind {
112 ;CHECK-LABEL: vqrshrnu8:
114 %tmp1 = load <8 x i16>, <8 x i16>* %A
115 %tmp2 = call <8 x i8> @llvm.arm.neon.vqrshiftnu.v8i8(<8 x i16> %tmp1, <8 x i16> < i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8 >)
119 define <4 x i16> @vqrshrnu16(<4 x i32>* %A) nounwind {
120 ;CHECK-LABEL: vqrshrnu16:
122 %tmp1 = load <4 x i32>, <4 x i32>* %A
123 %tmp2 = call <4 x i16> @llvm.arm.neon.vqrshiftnu.v4i16(<4 x i32> %tmp1, <4 x i32> < i32 -16, i32 -16, i32 -16, i32 -16 >)
127 define <2 x i32> @vqrshrnu32(<2 x i64>* %A) nounwind {
128 ;CHECK-LABEL: vqrshrnu32:
130 %tmp1 = load <2 x i64>, <2 x i64>* %A
131 %tmp2 = call <2 x i32> @llvm.arm.neon.vqrshiftnu.v2i32(<2 x i64> %tmp1, <2 x i64> < i64 -32, i64 -32 >)
135 define <8 x i8> @vqrshruns8(<8 x i16>* %A) nounwind {
136 ;CHECK-LABEL: vqrshruns8:
138 %tmp1 = load <8 x i16>, <8 x i16>* %A
139 %tmp2 = call <8 x i8> @llvm.arm.neon.vqrshiftnsu.v8i8(<8 x i16> %tmp1, <8 x i16> < i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8 >)
143 define <4 x i16> @vqrshruns16(<4 x i32>* %A) nounwind {
144 ;CHECK-LABEL: vqrshruns16:
146 %tmp1 = load <4 x i32>, <4 x i32>* %A
147 %tmp2 = call <4 x i16> @llvm.arm.neon.vqrshiftnsu.v4i16(<4 x i32> %tmp1, <4 x i32> < i32 -16, i32 -16, i32 -16, i32 -16 >)
151 define <2 x i32> @vqrshruns32(<2 x i64>* %A) nounwind {
152 ;CHECK-LABEL: vqrshruns32:
154 %tmp1 = load <2 x i64>, <2 x i64>* %A
155 %tmp2 = call <2 x i32> @llvm.arm.neon.vqrshiftnsu.v2i32(<2 x i64> %tmp1, <2 x i64> < i64 -32, i64 -32 >)
159 declare <8 x i8> @llvm.arm.neon.vqrshiftns.v8i8(<8 x i16>, <8 x i16>) nounwind readnone
160 declare <4 x i16> @llvm.arm.neon.vqrshiftns.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
161 declare <2 x i32> @llvm.arm.neon.vqrshiftns.v2i32(<2 x i64>, <2 x i64>) nounwind readnone
163 declare <8 x i8> @llvm.arm.neon.vqrshiftnu.v8i8(<8 x i16>, <8 x i16>) nounwind readnone
164 declare <4 x i16> @llvm.arm.neon.vqrshiftnu.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
165 declare <2 x i32> @llvm.arm.neon.vqrshiftnu.v2i32(<2 x i64>, <2 x i64>) nounwind readnone
167 declare <8 x i8> @llvm.arm.neon.vqrshiftnsu.v8i8(<8 x i16>, <8 x i16>) nounwind readnone
168 declare <4 x i16> @llvm.arm.neon.vqrshiftnsu.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
169 declare <2 x i32> @llvm.arm.neon.vqrshiftnsu.v2i32(<2 x i64>, <2 x i64>) nounwind readnone