1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc < %s -mtriple armv7-eabi -o - | FileCheck %s --check-prefixes=CHECK,CHECK-LE
3 ; RUN: llc < %s -mtriple armebv7-eabi -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
5 define arm_aapcs_vfpcc <8 x i8> @vmov_i8() {
6 ; CHECK-LE-LABEL: vmov_i8:
8 ; CHECK-LE-NEXT: vmov.i64 d0, #0xff00000000000000
11 ; CHECK-BE-LABEL: vmov_i8:
13 ; CHECK-BE-NEXT: vmov.i64 d16, #0xff00000000000000
14 ; CHECK-BE-NEXT: vrev64.8 d0, d16
15 ; CHECK-BE-NEXT: bx lr
16 ret <8 x i8> <i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 -1>
19 define arm_aapcs_vfpcc <4 x i16> @vmov_i16_a() {
20 ; CHECK-LE-LABEL: vmov_i16_a:
22 ; CHECK-LE-NEXT: vmov.i64 d0, #0xffff000000000000
23 ; CHECK-LE-NEXT: bx lr
25 ; CHECK-BE-LABEL: vmov_i16_a:
27 ; CHECK-BE-NEXT: vmov.i64 d16, #0xffff000000000000
28 ; CHECK-BE-NEXT: vrev64.16 d0, d16
29 ; CHECK-BE-NEXT: bx lr
30 ret <4 x i16> <i16 0, i16 0, i16 0, i16 -1>
33 define arm_aapcs_vfpcc <4 x i16> @vmov_i16_b() {
34 ; CHECK-LE-LABEL: vmov_i16_b:
36 ; CHECK-LE-NEXT: vmov.i64 d0, #0xff000000000000
37 ; CHECK-LE-NEXT: bx lr
39 ; CHECK-BE-LABEL: vmov_i16_b:
41 ; CHECK-BE-NEXT: vmov.i64 d16, #0xff000000000000
42 ; CHECK-BE-NEXT: vrev64.16 d0, d16
43 ; CHECK-BE-NEXT: bx lr
44 ret <4 x i16> <i16 0, i16 0, i16 0, i16 255>
47 define arm_aapcs_vfpcc <4 x i16> @vmov_i16_c() {
48 ; CHECK-LE-LABEL: vmov_i16_c:
50 ; CHECK-LE-NEXT: vmov.i64 d0, #0xff00000000000000
51 ; CHECK-LE-NEXT: bx lr
53 ; CHECK-BE-LABEL: vmov_i16_c:
55 ; CHECK-BE-NEXT: vmov.i64 d16, #0xff00000000000000
56 ; CHECK-BE-NEXT: vrev64.16 d0, d16
57 ; CHECK-BE-NEXT: bx lr
58 ret <4 x i16> <i16 0, i16 0, i16 0, i16 65280>
61 define arm_aapcs_vfpcc <2 x i32> @vmov_i32_a() {
62 ; CHECK-LE-LABEL: vmov_i32_a:
64 ; CHECK-LE-NEXT: vmov.i64 d0, #0xffffffff00000000
65 ; CHECK-LE-NEXT: bx lr
67 ; CHECK-BE-LABEL: vmov_i32_a:
69 ; CHECK-BE-NEXT: vmov.i64 d16, #0xffffffff00000000
70 ; CHECK-BE-NEXT: vrev64.32 d0, d16
71 ; CHECK-BE-NEXT: bx lr
72 ret <2 x i32> <i32 0, i32 -1>
75 define arm_aapcs_vfpcc <2 x i32> @vmov_i32_b() {
76 ; CHECK-LE-LABEL: vmov_i32_b:
78 ; CHECK-LE-NEXT: vmov.i64 d0, #0xff00000000
79 ; CHECK-LE-NEXT: bx lr
81 ; CHECK-BE-LABEL: vmov_i32_b:
83 ; CHECK-BE-NEXT: vmov.i64 d16, #0xff00000000
84 ; CHECK-BE-NEXT: vrev64.32 d0, d16
85 ; CHECK-BE-NEXT: bx lr
86 ret <2 x i32> <i32 0, i32 255>
89 define arm_aapcs_vfpcc <2 x i32> @vmov_i32_c() {
90 ; CHECK-LE-LABEL: vmov_i32_c:
92 ; CHECK-LE-NEXT: vmov.i64 d0, #0xff0000000000
93 ; CHECK-LE-NEXT: bx lr
95 ; CHECK-BE-LABEL: vmov_i32_c:
97 ; CHECK-BE-NEXT: vmov.i64 d16, #0xff0000000000
98 ; CHECK-BE-NEXT: vrev64.32 d0, d16
99 ; CHECK-BE-NEXT: bx lr
100 ret <2 x i32> <i32 0, i32 65280>
103 define arm_aapcs_vfpcc <2 x i32> @vmov_i32_d() {
104 ; CHECK-LE-LABEL: vmov_i32_d:
106 ; CHECK-LE-NEXT: vmov.i64 d0, #0xff000000000000
107 ; CHECK-LE-NEXT: bx lr
109 ; CHECK-BE-LABEL: vmov_i32_d:
111 ; CHECK-BE-NEXT: vmov.i64 d16, #0xff000000000000
112 ; CHECK-BE-NEXT: vrev64.32 d0, d16
113 ; CHECK-BE-NEXT: bx lr
114 ret <2 x i32> <i32 0, i32 16711680>
117 define arm_aapcs_vfpcc <2 x i32> @vmov_i32_e() {
118 ; CHECK-LE-LABEL: vmov_i32_e:
120 ; CHECK-LE-NEXT: vmov.i64 d0, #0xff00000000000000
121 ; CHECK-LE-NEXT: bx lr
123 ; CHECK-BE-LABEL: vmov_i32_e:
125 ; CHECK-BE-NEXT: vmov.i64 d16, #0xff00000000000000
126 ; CHECK-BE-NEXT: vrev64.32 d0, d16
127 ; CHECK-BE-NEXT: bx lr
128 ret <2 x i32> <i32 0, i32 4278190080>
131 define arm_aapcs_vfpcc <1 x i64> @vmov_i64_a() {
132 ; CHECK-LABEL: vmov_i64_a:
134 ; CHECK-NEXT: vmov.i8 d0, #0xff
136 ret <1 x i64> <i64 -1>
139 define arm_aapcs_vfpcc <1 x i64> @vmov_i64_b() {
140 ; CHECK-LE-LABEL: vmov_i64_b:
142 ; CHECK-LE-NEXT: vmov.i64 d0, #0xffff00ff0000ff
143 ; CHECK-LE-NEXT: bx lr
145 ; CHECK-BE-LABEL: vmov_i64_b:
147 ; CHECK-BE-NEXT: vmov.i64 d16, #0xff0000ff00ffff00
148 ; CHECK-BE-NEXT: vrev64.32 d0, d16
149 ; CHECK-BE-NEXT: bx lr
150 ret <1 x i64> <i64 72056498804490495>
153 define arm_aapcs_vfpcc <2 x i64> @vmov_v2i64_b() {
154 ; CHECK-LABEL: vmov_v2i64_b:
156 ; CHECK-NEXT: vmov.i64 q0, #0xffff00ff0000ff
158 ret <2 x i64> <i64 72056498804490495, i64 72056498804490495>
161 define arm_aapcs_vfpcc <4 x i32> @vmov_v4i32_b() {
162 ; CHECK-LE-LABEL: vmov_v4i32_b:
164 ; CHECK-LE-NEXT: vmov.i64 q0, #0xff0000ff00ffff00
165 ; CHECK-LE-NEXT: bx lr
167 ; CHECK-BE-LABEL: vmov_v4i32_b:
169 ; CHECK-BE-NEXT: vmov.i64 q0, #0xffff00ff0000ff
170 ; CHECK-BE-NEXT: bx lr
171 ret <4 x i32> <i32 u0xffff00, i32 u0xff0000ff, i32 u0xffff00, i32 u0xff0000ff>
174 define arm_aapcs_vfpcc <2 x i64> @and_v2i64_b(<2 x i64> %a) {
175 ; CHECK-LE-LABEL: and_v2i64_b:
177 ; CHECK-LE-NEXT: vmov.i64 q8, #0xffff00ff0000ff
178 ; CHECK-LE-NEXT: vand q0, q0, q8
179 ; CHECK-LE-NEXT: bx lr
181 ; CHECK-BE-LABEL: and_v2i64_b:
183 ; CHECK-BE-NEXT: vmov.i64 q8, #0xff0000ff00ffff00
184 ; CHECK-BE-NEXT: vrev64.32 q8, q8
185 ; CHECK-BE-NEXT: vand q0, q0, q8
186 ; CHECK-BE-NEXT: bx lr
187 %b = and <2 x i64> %a, <i64 72056498804490495, i64 72056498804490495>
191 define arm_aapcs_vfpcc <4 x i32> @and_v4i32_b(<4 x i32> %a) {
192 ; CHECK-LE-LABEL: and_v4i32_b:
194 ; CHECK-LE-NEXT: vmov.i64 q8, #0xff0000ff00ffff00
195 ; CHECK-LE-NEXT: vand q0, q0, q8
196 ; CHECK-LE-NEXT: bx lr
198 ; CHECK-BE-LABEL: and_v4i32_b:
200 ; CHECK-BE-NEXT: vmov.i64 q8, #0xff0000ff00ffff00
201 ; CHECK-BE-NEXT: vrev64.32 q9, q0
202 ; CHECK-BE-NEXT: vand q8, q9, q8
203 ; CHECK-BE-NEXT: vrev64.32 q0, q8
204 ; CHECK-BE-NEXT: bx lr
205 %b = and <4 x i32> %a, <i32 u0xffff00, i32 u0xff0000ff, i32 u0xffff00, i32 u0xff0000ff>
209 define arm_aapcs_vfpcc <8 x i16> @vmvn_v16i8_m1() {
210 ; CHECK-LE-LABEL: vmvn_v16i8_m1:
212 ; CHECK-LE-NEXT: vmvn.i32 q0, #0x10000
213 ; CHECK-LE-NEXT: bx lr
215 ; CHECK-BE-LABEL: vmvn_v16i8_m1:
217 ; CHECK-BE-NEXT: vmvn.i32 q0, #0x1
218 ; CHECK-BE-NEXT: bx lr
219 ret <8 x i16> <i16 65535, i16 65534, i16 65535, i16 65534, i16 65535, i16 65534, i16 65535, i16 65534>
222 define arm_aapcs_vfpcc <8 x i16> @and_v8i16_m1(<8 x i16> %a) {
223 ; CHECK-LE-LABEL: and_v8i16_m1:
225 ; CHECK-LE-NEXT: vbic.i32 q0, #0x10000
226 ; CHECK-LE-NEXT: bx lr
228 ; CHECK-BE-LABEL: and_v8i16_m1:
230 ; CHECK-BE-NEXT: vrev64.16 q8, q0
231 ; CHECK-BE-NEXT: vbic.i32 q8, #0x10000
232 ; CHECK-BE-NEXT: vrev64.16 q0, q8
233 ; CHECK-BE-NEXT: bx lr
234 %b = and <8 x i16> %a, <i16 65535, i16 65534, i16 65535, i16 65534, i16 65535, i16 65534, i16 65535, i16 65534>
238 define arm_aapcs_vfpcc <8 x i16> @or_v8i16_1(<8 x i16> %a) {
239 ; CHECK-LE-LABEL: or_v8i16_1:
241 ; CHECK-LE-NEXT: vorr.i32 q0, #0x10000
242 ; CHECK-LE-NEXT: bx lr
244 ; CHECK-BE-LABEL: or_v8i16_1:
246 ; CHECK-BE-NEXT: vrev64.16 q8, q0
247 ; CHECK-BE-NEXT: vorr.i32 q8, #0x10000
248 ; CHECK-BE-NEXT: vrev64.16 q0, q8
249 ; CHECK-BE-NEXT: bx lr
250 %b = or <8 x i16> %a, <i16 0, i16 1, i16 0, i16 1, i16 0, i16 1, i16 0, i16 1>
254 define arm_aapcs_vfpcc <8 x i16> @xor_v8i16_m1(<8 x i16> %a) {
255 ; CHECK-LE-LABEL: xor_v8i16_m1:
257 ; CHECK-LE-NEXT: vmvn.i32 q8, #0x10000
258 ; CHECK-LE-NEXT: veor q0, q0, q8
259 ; CHECK-LE-NEXT: bx lr
261 ; CHECK-BE-LABEL: xor_v8i16_m1:
263 ; CHECK-BE-NEXT: vmvn.i32 q8, #0x10000
264 ; CHECK-BE-NEXT: vrev64.16 q9, q0
265 ; CHECK-BE-NEXT: veor q8, q9, q8
266 ; CHECK-BE-NEXT: vrev64.16 q0, q8
267 ; CHECK-BE-NEXT: bx lr
268 %b = xor <8 x i16> %a, <i16 65535, i16 65534, i16 65535, i16 65534, i16 65535, i16 65534, i16 65535, i16 65534>