1 /* { dg-do run { target aarch64_sve_hw } } */
2 /* { dg-options "-O0 -g" } */
3
4 #include <arm_sve.h>
5
6 void __attribute__((noipa))
callee(svbool_t p,svint8_t s8,svuint16x4_t u16,svfloat32x3_t f32,svint64x2_t s64)7 callee (svbool_t p, svint8_t s8, svuint16x4_t u16, svfloat32x3_t f32,
8 svint64x2_t s64)
9 {
10 svbool_t pg;
11 pg = svptrue_b8 ();
12
13 if (svptest_any (pg, sveor_z (pg, p, svptrue_pat_b8 (SV_VL7))))
14 __builtin_abort ();
15
16 if (svptest_any (pg, svcmpne (pg, s8, svindex_s8 (1, 2))))
17 __builtin_abort ();
18
19 if (svptest_any (pg, svcmpne (pg, svget4 (u16, 0), svindex_u16 (2, 3))))
20 __builtin_abort ();
21
22 if (svptest_any (pg, svcmpne (pg, svget4 (u16, 1), svindex_u16 (3, 4))))
23 __builtin_abort ();
24
25 if (svptest_any (pg, svcmpne (pg, svget4 (u16, 2), svindex_u16 (4, 5))))
26 __builtin_abort ();
27
28 if (svptest_any (pg, svcmpne (pg, svget4 (u16, 3), svindex_u16 (5, 6))))
29 __builtin_abort ();
30
31 if (svptest_any (pg, svcmpne (pg, svget3 (f32, 0), svdup_f32 (1.0))))
32 __builtin_abort ();
33
34 if (svptest_any (pg, svcmpne (pg, svget3 (f32, 1), svdup_f32 (2.0))))
35 __builtin_abort ();
36
37 if (svptest_any (pg, svcmpne (pg, svget3 (f32, 2), svdup_f32 (3.0))))
38 __builtin_abort ();
39
40 if (svptest_any (pg, svcmpne (pg, svget2 (s64, 0), svindex_s64 (6, 7))))
41 __builtin_abort ();
42
43 if (svptest_any (pg, svcmpne (pg, svget2 (s64, 1), svindex_s64 (7, 8))))
44 __builtin_abort ();
45 }
46
47 int __attribute__((noipa))
main(void)48 main (void)
49 {
50 callee (svptrue_pat_b8 (SV_VL7),
51 svindex_s8 (1, 2),
52 svcreate4 (svindex_u16 (2, 3),
53 svindex_u16 (3, 4),
54 svindex_u16 (4, 5),
55 svindex_u16 (5, 6)),
56 svcreate3 (svdup_f32 (1.0),
57 svdup_f32 (2.0),
58 svdup_f32 (3.0)),
59 svcreate2 (svindex_s64 (6, 7),
60 svindex_s64 (7, 8)));
61 }
62