]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gcc.target/arm/mve/intrinsics/vsubq_x_n_f32.c
arm: improve tests and fix vsubq*
[gcc.git] / gcc / testsuite / gcc.target / arm / mve / intrinsics / vsubq_x_n_f32.c
1 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
2 /* { dg-add-options arm_v8_1m_mve_fp } */
3 /* { dg-additional-options "-O2" } */
4 /* { dg-final { check-function-bodies "**" "" } } */
5
6 #include "arm_mve.h"
7
8 /*
9 **foo:
10 ** ...
11 ** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|)
12 ** ...
13 ** vpst(?: @.*|)
14 ** ...
15 ** vsubt.f32 q[0-9]+, q[0-9]+, (?:ip|fp|r[0-9]+)(?: @.*|)
16 ** ...
17 */
18 float32x4_t
19 foo (float32x4_t a, float32_t b, mve_pred16_t p)
20 {
21 return vsubq_x_n_f32 (a, b, p);
22 }
23
24
25 /*
26 **foo1:
27 ** ...
28 ** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|)
29 ** ...
30 ** vpst(?: @.*|)
31 ** ...
32 ** vsubt.f32 q[0-9]+, q[0-9]+, (?:ip|fp|r[0-9]+)(?: @.*|)
33 ** ...
34 */
35 float32x4_t
36 foo1 (float32x4_t a, float32_t b, mve_pred16_t p)
37 {
38 return vsubq_x (a, b, p);
39 }
40
41 /*
42 **foo2:
43 ** ...
44 ** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|)
45 ** ...
46 ** vpst(?: @.*|)
47 ** ...
48 ** vsubt.f32 q[0-9]+, q[0-9]+, (?:ip|fp|r[0-9]+)(?: @.*|)
49 ** ...
50 */
51 float32x4_t
52 foo2 (float32x4_t a, mve_pred16_t p)
53 {
54 return vsubq_x (a, 1.1, p);
55 }
56
57 /* { dg-final { scan-assembler-not "__ARM_undef" } } */
This page took 0.039278 seconds and 5 git commands to generate.