xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // REQUIRES: aarch64-registered-target
2*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -target-cpu cyclone \
3f4a2713aSLionel Sambuc // RUN:   -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
4f4a2713aSLionel Sambuc 
5f4a2713aSLionel Sambuc // Test new aarch64 intrinsics and types
6f4a2713aSLionel Sambuc 
7f4a2713aSLionel Sambuc #include <arm_neon.h>
8f4a2713aSLionel Sambuc 
9f4a2713aSLionel Sambuc 
test_vmuls_lane_f32(float32_t a,float32x2_t b)10f4a2713aSLionel Sambuc float32_t test_vmuls_lane_f32(float32_t a, float32x2_t b) {
11*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: test_vmuls_lane_f32
12f4a2713aSLionel Sambuc   return vmuls_lane_f32(a, b, 1);
13f4a2713aSLionel Sambuc   // CHECK: fmul {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
14f4a2713aSLionel Sambuc }
15f4a2713aSLionel Sambuc 
test_vmuld_lane_f64(float64_t a,float64x1_t b)16f4a2713aSLionel Sambuc float64_t test_vmuld_lane_f64(float64_t a, float64x1_t b) {
17*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: test_vmuld_lane_f64
18f4a2713aSLionel Sambuc   return vmuld_lane_f64(a, b, 0);
19*0a6a1f1dSLionel Sambuc   // CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
20f4a2713aSLionel Sambuc }
21f4a2713aSLionel Sambuc 
test_vmuls_laneq_f32(float32_t a,float32x4_t b)22f4a2713aSLionel Sambuc float32_t test_vmuls_laneq_f32(float32_t a, float32x4_t b) {
23*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: test_vmuls_laneq_f32
24f4a2713aSLionel Sambuc   return vmuls_laneq_f32(a, b, 3);
25f4a2713aSLionel Sambuc   // CHECK: fmul {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
26f4a2713aSLionel Sambuc }
27f4a2713aSLionel Sambuc 
test_vmuld_laneq_f64(float64_t a,float64x2_t b)28f4a2713aSLionel Sambuc float64_t test_vmuld_laneq_f64(float64_t a, float64x2_t b) {
29*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: test_vmuld_laneq_f64
30f4a2713aSLionel Sambuc   return vmuld_laneq_f64(a, b, 1);
31f4a2713aSLionel Sambuc   // CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[1]
32f4a2713aSLionel Sambuc }
33f4a2713aSLionel Sambuc 
test_vmul_n_f64(float64x1_t a,float64_t b)34f4a2713aSLionel Sambuc float64x1_t test_vmul_n_f64(float64x1_t a, float64_t b) {
35*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: test_vmul_n_f64
36f4a2713aSLionel Sambuc   return vmul_n_f64(a, b);
37*0a6a1f1dSLionel Sambuc   // CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
38f4a2713aSLionel Sambuc }
39f4a2713aSLionel Sambuc 
test_vmulxs_lane_f32(float32_t a,float32x2_t b)40f4a2713aSLionel Sambuc float32_t test_vmulxs_lane_f32(float32_t a, float32x2_t b) {
41*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vmulxs_lane_f32
42f4a2713aSLionel Sambuc   return vmulxs_lane_f32(a, b, 1);
43f4a2713aSLionel Sambuc // CHECK: fmulx {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
44f4a2713aSLionel Sambuc }
45f4a2713aSLionel Sambuc 
test_vmulxs_laneq_f32(float32_t a,float32x4_t b)46f4a2713aSLionel Sambuc float32_t test_vmulxs_laneq_f32(float32_t a, float32x4_t b) {
47*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vmulxs_laneq_f32
48f4a2713aSLionel Sambuc   return vmulxs_laneq_f32(a, b, 3);
49f4a2713aSLionel Sambuc // CHECK: fmulx {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
50f4a2713aSLionel Sambuc }
51f4a2713aSLionel Sambuc 
test_vmulxd_lane_f64(float64_t a,float64x1_t b)52f4a2713aSLionel Sambuc float64_t test_vmulxd_lane_f64(float64_t a, float64x1_t b) {
53*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vmulxd_lane_f64
54f4a2713aSLionel Sambuc   return vmulxd_lane_f64(a, b, 0);
55*0a6a1f1dSLionel Sambuc // CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
56f4a2713aSLionel Sambuc }
57f4a2713aSLionel Sambuc 
test_vmulxd_laneq_f64(float64_t a,float64x2_t b)58f4a2713aSLionel Sambuc float64_t test_vmulxd_laneq_f64(float64_t a, float64x2_t b) {
59*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vmulxd_laneq_f64
60f4a2713aSLionel Sambuc   return vmulxd_laneq_f64(a, b, 1);
61f4a2713aSLionel Sambuc // CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[1]
62f4a2713aSLionel Sambuc }
63f4a2713aSLionel Sambuc 
64*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vmulx_lane_f64
test_vmulx_lane_f64(float64x1_t a,float64x1_t b)65f4a2713aSLionel Sambuc float64x1_t test_vmulx_lane_f64(float64x1_t a, float64x1_t b) {
66f4a2713aSLionel Sambuc   return vmulx_lane_f64(a, b, 0);
67*0a6a1f1dSLionel Sambuc   // CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
68f4a2713aSLionel Sambuc }
69f4a2713aSLionel Sambuc 
70f4a2713aSLionel Sambuc 
71*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vmulx_laneq_f64_0
test_vmulx_laneq_f64_0(float64x1_t a,float64x2_t b)72f4a2713aSLionel Sambuc float64x1_t test_vmulx_laneq_f64_0(float64x1_t a, float64x2_t b) {
73f4a2713aSLionel Sambuc   return vmulx_laneq_f64(a, b, 0);
74f4a2713aSLionel Sambuc   // CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
75f4a2713aSLionel Sambuc }
76f4a2713aSLionel Sambuc 
77*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vmulx_laneq_f64_1
test_vmulx_laneq_f64_1(float64x1_t a,float64x2_t b)78f4a2713aSLionel Sambuc float64x1_t test_vmulx_laneq_f64_1(float64x1_t a, float64x2_t b) {
79f4a2713aSLionel Sambuc   return vmulx_laneq_f64(a, b, 1);
80f4a2713aSLionel Sambuc   // CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[1]
81f4a2713aSLionel Sambuc }
82f4a2713aSLionel Sambuc 
83f4a2713aSLionel Sambuc 
84*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vfmas_lane_f32
test_vfmas_lane_f32(float32_t a,float32_t b,float32x2_t c)85f4a2713aSLionel Sambuc float32_t test_vfmas_lane_f32(float32_t a, float32_t b, float32x2_t c) {
86f4a2713aSLionel Sambuc   return vfmas_lane_f32(a, b, c, 1);
87f4a2713aSLionel Sambuc   // CHECK: fmla {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
88f4a2713aSLionel Sambuc }
89f4a2713aSLionel Sambuc 
90*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vfmad_lane_f64
test_vfmad_lane_f64(float64_t a,float64_t b,float64x1_t c)91f4a2713aSLionel Sambuc float64_t test_vfmad_lane_f64(float64_t a, float64_t b, float64x1_t c) {
92f4a2713aSLionel Sambuc   return vfmad_lane_f64(a, b, c, 0);
93*0a6a1f1dSLionel Sambuc   // CHECK: {{fmla|fmadd}} {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
94f4a2713aSLionel Sambuc }
95f4a2713aSLionel Sambuc 
96*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vfmad_laneq_f64
test_vfmad_laneq_f64(float64_t a,float64_t b,float64x2_t c)97f4a2713aSLionel Sambuc float64_t test_vfmad_laneq_f64(float64_t a, float64_t b, float64x2_t c) {
98f4a2713aSLionel Sambuc   return vfmad_laneq_f64(a, b, c, 1);
99f4a2713aSLionel Sambuc   // CHECK: fmla {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[1]
100f4a2713aSLionel Sambuc }
101f4a2713aSLionel Sambuc 
102*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vfmss_lane_f32
test_vfmss_lane_f32(float32_t a,float32_t b,float32x2_t c)103f4a2713aSLionel Sambuc float32_t test_vfmss_lane_f32(float32_t a, float32_t b, float32x2_t c) {
104f4a2713aSLionel Sambuc   return vfmss_lane_f32(a, b, c, 1);
105f4a2713aSLionel Sambuc   // CHECK: fmls {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
106f4a2713aSLionel Sambuc }
107f4a2713aSLionel Sambuc 
108*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vfma_lane_f64
test_vfma_lane_f64(float64x1_t a,float64x1_t b,float64x1_t v)109f4a2713aSLionel Sambuc float64x1_t test_vfma_lane_f64(float64x1_t a, float64x1_t b, float64x1_t v) {
110f4a2713aSLionel Sambuc   return vfma_lane_f64(a, b, v, 0);
111*0a6a1f1dSLionel Sambuc   // CHECK: {{fmla|fmadd}} {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
112f4a2713aSLionel Sambuc }
113f4a2713aSLionel Sambuc 
114*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vfms_lane_f64
test_vfms_lane_f64(float64x1_t a,float64x1_t b,float64x1_t v)115f4a2713aSLionel Sambuc float64x1_t test_vfms_lane_f64(float64x1_t a, float64x1_t b, float64x1_t v) {
116f4a2713aSLionel Sambuc   return vfms_lane_f64(a, b, v, 0);
117*0a6a1f1dSLionel Sambuc   // CHECK: {{fmls|fmsub}} {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
118f4a2713aSLionel Sambuc }
119f4a2713aSLionel Sambuc 
120*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vfma_laneq_f64
test_vfma_laneq_f64(float64x1_t a,float64x1_t b,float64x2_t v)121f4a2713aSLionel Sambuc float64x1_t test_vfma_laneq_f64(float64x1_t a, float64x1_t b, float64x2_t v) {
122f4a2713aSLionel Sambuc   return vfma_laneq_f64(a, b, v, 0);
123f4a2713aSLionel Sambuc   // CHECK: fmla {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
124f4a2713aSLionel Sambuc }
125f4a2713aSLionel Sambuc 
126*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vfms_laneq_f64
test_vfms_laneq_f64(float64x1_t a,float64x1_t b,float64x2_t v)127f4a2713aSLionel Sambuc float64x1_t test_vfms_laneq_f64(float64x1_t a, float64x1_t b, float64x2_t v) {
128f4a2713aSLionel Sambuc   return vfms_laneq_f64(a, b, v, 0);
129f4a2713aSLionel Sambuc   // CHECK: fmls {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
130f4a2713aSLionel Sambuc }
131f4a2713aSLionel Sambuc 
132*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmullh_lane_s16
test_vqdmullh_lane_s16(int16_t a,int16x4_t b)133f4a2713aSLionel Sambuc int32_t test_vqdmullh_lane_s16(int16_t a, int16x4_t b) {
134f4a2713aSLionel Sambuc   return vqdmullh_lane_s16(a, b, 3);
135*0a6a1f1dSLionel Sambuc   // CHECK: sqdmull {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9].4h}}, {{v[0-9]+}}.h[3]
136f4a2713aSLionel Sambuc }
137f4a2713aSLionel Sambuc 
138*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmulls_lane_s32
test_vqdmulls_lane_s32(int32_t a,int32x2_t b)139f4a2713aSLionel Sambuc int64_t test_vqdmulls_lane_s32(int32_t a, int32x2_t b) {
140f4a2713aSLionel Sambuc   return vqdmulls_lane_s32(a, b, 1);
141f4a2713aSLionel Sambuc   // CHECK: sqdmull {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
142f4a2713aSLionel Sambuc }
143f4a2713aSLionel Sambuc 
144*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmullh_laneq_s16
test_vqdmullh_laneq_s16(int16_t a,int16x8_t b)145f4a2713aSLionel Sambuc int32_t test_vqdmullh_laneq_s16(int16_t a, int16x8_t b) {
146f4a2713aSLionel Sambuc   return vqdmullh_laneq_s16(a, b, 7);
147*0a6a1f1dSLionel Sambuc   // CHECK: sqdmull {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[7]
148f4a2713aSLionel Sambuc }
149f4a2713aSLionel Sambuc 
150*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmulls_laneq_s32
test_vqdmulls_laneq_s32(int32_t a,int32x4_t b)151f4a2713aSLionel Sambuc int64_t test_vqdmulls_laneq_s32(int32_t a, int32x4_t b) {
152f4a2713aSLionel Sambuc   return vqdmulls_laneq_s32(a, b, 3);
153f4a2713aSLionel Sambuc   // CHECK: sqdmull {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
154f4a2713aSLionel Sambuc }
155f4a2713aSLionel Sambuc 
156*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmulhh_lane_s16
test_vqdmulhh_lane_s16(int16_t a,int16x4_t b)157f4a2713aSLionel Sambuc int16_t test_vqdmulhh_lane_s16(int16_t a, int16x4_t b) {
158f4a2713aSLionel Sambuc   return vqdmulhh_lane_s16(a, b, 3);
159*0a6a1f1dSLionel Sambuc // CHECK: sqdmulh {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[3]
160f4a2713aSLionel Sambuc }
161f4a2713aSLionel Sambuc 
162*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmulhs_lane_s32
test_vqdmulhs_lane_s32(int32_t a,int32x2_t b)163f4a2713aSLionel Sambuc int32_t test_vqdmulhs_lane_s32(int32_t a, int32x2_t b) {
164f4a2713aSLionel Sambuc   return vqdmulhs_lane_s32(a, b, 1);
165f4a2713aSLionel Sambuc // CHECK: sqdmulh {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
166f4a2713aSLionel Sambuc }
167f4a2713aSLionel Sambuc 
168f4a2713aSLionel Sambuc 
169*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmulhh_laneq_s16
test_vqdmulhh_laneq_s16(int16_t a,int16x8_t b)170f4a2713aSLionel Sambuc int16_t test_vqdmulhh_laneq_s16(int16_t a, int16x8_t b) {
171f4a2713aSLionel Sambuc   return vqdmulhh_laneq_s16(a, b, 7);
172*0a6a1f1dSLionel Sambuc // CHECK: sqdmulh {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[7]
173f4a2713aSLionel Sambuc }
174f4a2713aSLionel Sambuc 
175f4a2713aSLionel Sambuc 
176*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmulhs_laneq_s32
test_vqdmulhs_laneq_s32(int32_t a,int32x4_t b)177f4a2713aSLionel Sambuc int32_t test_vqdmulhs_laneq_s32(int32_t a, int32x4_t b) {
178f4a2713aSLionel Sambuc   return vqdmulhs_laneq_s32(a, b, 3);
179f4a2713aSLionel Sambuc // CHECK: sqdmulh {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
180f4a2713aSLionel Sambuc }
181f4a2713aSLionel Sambuc 
182*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqrdmulhh_lane_s16
test_vqrdmulhh_lane_s16(int16_t a,int16x4_t b)183f4a2713aSLionel Sambuc int16_t test_vqrdmulhh_lane_s16(int16_t a, int16x4_t b) {
184f4a2713aSLionel Sambuc   return vqrdmulhh_lane_s16(a, b, 3);
185*0a6a1f1dSLionel Sambuc // CHECK: sqrdmulh {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[3]
186f4a2713aSLionel Sambuc }
187f4a2713aSLionel Sambuc 
188*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqrdmulhs_lane_s32
test_vqrdmulhs_lane_s32(int32_t a,int32x2_t b)189f4a2713aSLionel Sambuc int32_t test_vqrdmulhs_lane_s32(int32_t a, int32x2_t b) {
190f4a2713aSLionel Sambuc   return vqrdmulhs_lane_s32(a, b, 1);
191f4a2713aSLionel Sambuc // CHECK: sqrdmulh {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
192f4a2713aSLionel Sambuc }
193f4a2713aSLionel Sambuc 
194f4a2713aSLionel Sambuc 
195*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqrdmulhh_laneq_s16
test_vqrdmulhh_laneq_s16(int16_t a,int16x8_t b)196f4a2713aSLionel Sambuc int16_t test_vqrdmulhh_laneq_s16(int16_t a, int16x8_t b) {
197f4a2713aSLionel Sambuc   return vqrdmulhh_laneq_s16(a, b, 7);
198*0a6a1f1dSLionel Sambuc // CHECK: sqrdmulh {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[7]
199f4a2713aSLionel Sambuc }
200f4a2713aSLionel Sambuc 
201f4a2713aSLionel Sambuc 
202*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqrdmulhs_laneq_s32
test_vqrdmulhs_laneq_s32(int32_t a,int32x4_t b)203f4a2713aSLionel Sambuc int32_t test_vqrdmulhs_laneq_s32(int32_t a, int32x4_t b) {
204f4a2713aSLionel Sambuc   return vqrdmulhs_laneq_s32(a, b, 3);
205f4a2713aSLionel Sambuc // CHECK: sqrdmulh {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
206f4a2713aSLionel Sambuc }
207f4a2713aSLionel Sambuc 
208*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmlalh_lane_s16
test_vqdmlalh_lane_s16(int32_t a,int16_t b,int16x4_t c)209f4a2713aSLionel Sambuc int32_t test_vqdmlalh_lane_s16(int32_t a, int16_t b, int16x4_t c) {
210f4a2713aSLionel Sambuc   return vqdmlalh_lane_s16(a, b, c, 3);
211*0a6a1f1dSLionel Sambuc // CHECK: sqdmlal {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[3]
212f4a2713aSLionel Sambuc }
213f4a2713aSLionel Sambuc 
214*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmlals_lane_s32
test_vqdmlals_lane_s32(int64_t a,int32_t b,int32x2_t c)215f4a2713aSLionel Sambuc int64_t test_vqdmlals_lane_s32(int64_t a, int32_t b, int32x2_t c) {
216f4a2713aSLionel Sambuc   return vqdmlals_lane_s32(a, b, c, 1);
217f4a2713aSLionel Sambuc // CHECK: sqdmlal {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
218f4a2713aSLionel Sambuc }
219f4a2713aSLionel Sambuc 
220*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmlalh_laneq_s16
test_vqdmlalh_laneq_s16(int32_t a,int16_t b,int16x8_t c)221f4a2713aSLionel Sambuc int32_t test_vqdmlalh_laneq_s16(int32_t a, int16_t b, int16x8_t c) {
222f4a2713aSLionel Sambuc   return vqdmlalh_laneq_s16(a, b, c, 7);
223*0a6a1f1dSLionel Sambuc // CHECK: sqdmlal {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[7]
224f4a2713aSLionel Sambuc }
225f4a2713aSLionel Sambuc 
226*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmlals_laneq_s32
test_vqdmlals_laneq_s32(int64_t a,int32_t b,int32x4_t c)227f4a2713aSLionel Sambuc int64_t test_vqdmlals_laneq_s32(int64_t a, int32_t b, int32x4_t c) {
228f4a2713aSLionel Sambuc   return vqdmlals_laneq_s32(a, b, c, 3);
229f4a2713aSLionel Sambuc // CHECK: sqdmlal {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
230f4a2713aSLionel Sambuc }
231f4a2713aSLionel Sambuc 
232*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmlslh_lane_s16
test_vqdmlslh_lane_s16(int32_t a,int16_t b,int16x4_t c)233f4a2713aSLionel Sambuc int32_t test_vqdmlslh_lane_s16(int32_t a, int16_t b, int16x4_t c) {
234f4a2713aSLionel Sambuc   return vqdmlslh_lane_s16(a, b, c, 3);
235*0a6a1f1dSLionel Sambuc // CHECK: sqdmlsl {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[3]
236f4a2713aSLionel Sambuc }
237f4a2713aSLionel Sambuc 
238*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmlsls_lane_s32
test_vqdmlsls_lane_s32(int64_t a,int32_t b,int32x2_t c)239f4a2713aSLionel Sambuc int64_t test_vqdmlsls_lane_s32(int64_t a, int32_t b, int32x2_t c) {
240f4a2713aSLionel Sambuc   return vqdmlsls_lane_s32(a, b, c, 1);
241f4a2713aSLionel Sambuc // CHECK: sqdmlsl {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
242f4a2713aSLionel Sambuc }
243f4a2713aSLionel Sambuc 
244*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmlslh_laneq_s16
test_vqdmlslh_laneq_s16(int32_t a,int16_t b,int16x8_t c)245f4a2713aSLionel Sambuc int32_t test_vqdmlslh_laneq_s16(int32_t a, int16_t b, int16x8_t c) {
246f4a2713aSLionel Sambuc   return vqdmlslh_laneq_s16(a, b, c, 7);
247*0a6a1f1dSLionel Sambuc // CHECK: sqdmlsl {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[7]
248f4a2713aSLionel Sambuc }
249f4a2713aSLionel Sambuc 
250*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vqdmlsls_laneq_s32
test_vqdmlsls_laneq_s32(int64_t a,int32_t b,int32x4_t c)251f4a2713aSLionel Sambuc int64_t test_vqdmlsls_laneq_s32(int64_t a, int32_t b, int32x4_t c) {
252f4a2713aSLionel Sambuc   return vqdmlsls_laneq_s32(a, b, c, 3);
253f4a2713aSLionel Sambuc // CHECK: sqdmlsl {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
254f4a2713aSLionel Sambuc }
255f4a2713aSLionel Sambuc 
256*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vmulx_lane_f64_0:
test_vmulx_lane_f64_0()257*0a6a1f1dSLionel Sambuc float64x1_t test_vmulx_lane_f64_0() {
258*0a6a1f1dSLionel Sambuc       float64x1_t arg1;
259*0a6a1f1dSLionel Sambuc       float64x1_t arg2;
260*0a6a1f1dSLionel Sambuc       float64x1_t result;
261*0a6a1f1dSLionel Sambuc       float64_t sarg1, sarg2, sres;
262*0a6a1f1dSLionel Sambuc       arg1 = vcreate_f64(UINT64_C(0x3fd6304bc43ab5c2));
263*0a6a1f1dSLionel Sambuc       arg2 = vcreate_f64(UINT64_C(0x3fee211e215aeef3));
264*0a6a1f1dSLionel Sambuc       result = vmulx_lane_f64(arg1, arg2, 0);
265*0a6a1f1dSLionel Sambuc // CHECK: adrp x[[ADDRLO:[0-9]+]]
266*0a6a1f1dSLionel Sambuc // CHECK: ldr d0, [x[[ADDRLO]],
267*0a6a1f1dSLionel Sambuc // CHECK: adrp x[[ADDRLO:[0-9]+]]
268*0a6a1f1dSLionel Sambuc // CHECK: ldr d1, [x[[ADDRLO]],
269*0a6a1f1dSLionel Sambuc // CHECK: fmulx d0, d1, d0
270*0a6a1f1dSLionel Sambuc       return result;
271*0a6a1f1dSLionel Sambuc }
272*0a6a1f1dSLionel Sambuc 
273*0a6a1f1dSLionel Sambuc // CHECK-LABEL: test_vmulx_laneq_f64_2:
test_vmulx_laneq_f64_2()274*0a6a1f1dSLionel Sambuc float64x1_t test_vmulx_laneq_f64_2() {
275*0a6a1f1dSLionel Sambuc       float64x1_t arg1;
276*0a6a1f1dSLionel Sambuc       float64x1_t arg2;
277*0a6a1f1dSLionel Sambuc       float64x2_t arg3;
278*0a6a1f1dSLionel Sambuc       float64x1_t result;
279*0a6a1f1dSLionel Sambuc       float64_t sarg1, sarg2, sres;
280*0a6a1f1dSLionel Sambuc       arg1 = vcreate_f64(UINT64_C(0x3fd6304bc43ab5c2));
281*0a6a1f1dSLionel Sambuc       arg2 = vcreate_f64(UINT64_C(0x3fee211e215aeef3));
282*0a6a1f1dSLionel Sambuc       arg3 = vcombine_f64(arg1, arg2);
283*0a6a1f1dSLionel Sambuc       result = vmulx_laneq_f64(arg1, arg3, 1);
284*0a6a1f1dSLionel Sambuc // CHECK: adrp x[[ADDRLO:[0-9]+]]
285*0a6a1f1dSLionel Sambuc // CHECK: ldr d0, [x[[ADDRLO]],
286*0a6a1f1dSLionel Sambuc // CHECK: adrp x[[ADDRLO:[0-9]+]]
287*0a6a1f1dSLionel Sambuc // CHECK: ldr d1, [x[[ADDRLO]],
288*0a6a1f1dSLionel Sambuc // CHECK: fmulx d0, d1, d0
289*0a6a1f1dSLionel Sambuc       return result;
290*0a6a1f1dSLionel Sambuc }
291