Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/mf8-reinterpret.c

raw
1 /* { dg-do compile { target { aarch64*-*-* } } } */
2
3 #include <arm_neon.h>
4
5 #define TEST_128(T, S) \
6 T test_vreinterpretq_##S##_mf8 (mfloat8x16_t a)\
7 { \
8 return vreinterpretq_##S##_mf8 (a); \
9 } \
10 \
11 mfloat8x16_t test_vreinterpretq_mf8_##S (T a) \
12 { \
13 return vreinterpretq_mf8_##S (a); \
14 }
15
16
17 #define TEST_BOTH(T1, T2, S) \
18 TEST_128(T2, S) \
19 T1 test_vreinterpret_##S##_mf8 (mfloat8x8_t a) \
20 { \
21 return vreinterpret_##S##_mf8 (a); \
22 } \
23 \
24 mfloat8x8_t test_vreinterpret_mf8_##S (T1 a) \
25 { \
26 return vreinterpret_mf8_##S (a); \
27 }
28
29 TEST_BOTH(bfloat16x4_t, bfloat16x8_t, bf16)
30 TEST_BOTH(float16x4_t, float16x8_t, f16)
31 TEST_BOTH(float32x2_t, float32x4_t, f32)
32 TEST_BOTH(float64x1_t, float64x2_t, f64)
33 TEST_BOTH(poly8x8_t, poly8x16_t, p8)
34 TEST_BOTH(poly16x4_t, poly16x8_t, p16)
35 TEST_BOTH(poly64x1_t, poly64x2_t, p64)
36 TEST_128(poly128_t, p128)
37 TEST_BOTH(int8x8_t, int8x16_t, s8)
38 TEST_BOTH(int16x4_t, int16x8_t, s16)
39 TEST_BOTH(int32x2_t, int32x4_t, s32)
40 TEST_BOTH(int64x1_t, int64x2_t, s64)
41 TEST_BOTH(uint8x8_t, uint8x16_t, u8)
42 TEST_BOTH(uint16x4_t, uint16x8_t, u16)
43 TEST_BOTH(uint32x2_t, uint32x4_t, u32)
44 TEST_BOTH(uint64x1_t, uint64x2_t, u64)
45
46