Adjust 'libgomp.c/max_vf-*.c'
[official-gcc.git] / gcc / testsuite / gcc.target / arm / mve / intrinsics / mve_immediates_1_n.c
blob9ec6f98c881c90ef1b297cdbd00ca80208d8df0f
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" } */
5 #include "arm_mve.h"
7 uint8x16_t u8;
8 int8x16_t s8;
9 uint16x8_t u16;
10 int16x8_t s16;
11 uint32x4_t u32;
12 int32x4_t s32;
13 float16x8_t f16;
14 float32x4_t f32;
16 #define MACRO_VCVT_NAME(__to1,__from1) \
17 vcvtq_n_##__to1 ## _ ##__from1
19 #define MACRO_VCVT_NAME_P(__to1,__from1) \
20 vcvtq_m_n_##__to1 ## _ ##__from1
22 #define VCVT_TEST(to,from,val) \
23 to = MACRO_VCVT_NAME(to,from) (from, val); \
24 to = MACRO_VCVT_NAME_P(to,from) (to, from, val, p);
26 #define VQSHRN_TEST(to,from,val) \
27 to = vqshrnbq (to, from, val); \
28 to = vqshrntq (to, from, val); \
29 to = vqshrnbq_m (to, from, val, p); \
30 to = vqshrntq_m (to, from, val, p); \
32 #define VQSHRUN_TEST(to,from,val) \
33 to = vqshrunbq (to, from, val); \
34 to = vqshruntq (to, from, val); \
35 to = vqshrunbq_m (to, from, val, p); \
36 to = vqshruntq_m (to, from, val, p); \
38 void test (mve_pred16_t p)
40 VCVT_TEST(f16,s16,16)
41 VCVT_TEST(f16,u16,16)
42 VCVT_TEST(f32,s32,32)
43 VCVT_TEST(f32,u32,32)
44 VCVT_TEST(u16,f16,16)
45 VCVT_TEST(s16,f16,16)
46 VCVT_TEST(u32,f32,32)
47 VCVT_TEST(s32,f32,32)
48 VCVT_TEST(f16,s16,1)
49 VCVT_TEST(f16,u16,1)
50 VCVT_TEST(f32,s32,1)
51 VCVT_TEST(f32,u32,1)
52 VCVT_TEST(u16,f16,1)
53 VCVT_TEST(s16,f16,1)
54 VCVT_TEST(u32,f32,1)
55 VCVT_TEST(s32,f32,1)
56 VQSHRN_TEST(u8, u16, 8)
57 VQSHRN_TEST(s8, s16, 8)
58 VQSHRN_TEST(u16, u32, 16)
59 VQSHRN_TEST(s16, s32, 16)
60 VQSHRUN_TEST(u8, s16, 8)
61 VQSHRUN_TEST(u16, s32, 16)