Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/pfalse-store.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target elf } */
3 /* { dg-options "-O2 -funwind-tables" } */
4
5 #include <arm_sve.h>
6
7 #define T(F, TY1, TY2) \
8 void F##_f (TY1 *base, sv##TY2 data) \
9 { \
10 return sv##F (svpfalse_b (), base, data); \
11 }
12
13 #define D_INTEGER(F, TY) \
14 T (F##_s64, TY, int64_t) \
15 T (F##_u64, TY, uint64_t)
16
17 #define SD_INTEGER(F, TY) \
18 D_INTEGER (F, TY) \
19 T (F##_s32, TY, int32_t) \
20 T (F##_u32, TY, uint32_t)
21
22 #define HSD_INTEGER(F, TY) \
23 SD_INTEGER (F, TY) \
24 T (F##_s16, TY, int16_t) \
25 T (F##_u16, TY, uint16_t)
26
27 #define ALL_DATA(F, A) \
28 T (F##_bf16, bfloat16_t, bfloat16##A) \
29 T (F##_f16, float16_t, float16##A) \
30 T (F##_f32, float32_t, float32##A) \
31 T (F##_f64, float64_t, float64##A) \
32 T (F##_s8, int8_t, int8##A) \
33 T (F##_s16, int16_t, int16##A) \
34 T (F##_s32, int32_t, int32##A) \
35 T (F##_s64, int64_t, int64##A) \
36 T (F##_u8, uint8_t, uint8##A) \
37 T (F##_u16, uint16_t, uint16##A) \
38 T (F##_u32, uint32_t, uint32##A) \
39 T (F##_u64, uint64_t, uint64##A) \
40
41 HSD_INTEGER (st1b, int8_t)
42 SD_INTEGER (st1h, int16_t)
43 D_INTEGER (st1w, int32_t)
44 ALL_DATA (st1, _t)
45 ALL_DATA (st2, x2_t)
46 ALL_DATA (st3, x3_t)
47 ALL_DATA (st4, x4_t)
48
49 /* FIXME: Currently, st1/2/3/4 are not folded with a pfalse
50 predicate, which is the reason for the 48 missing cases below. Once
51 folding is implemented for these intrinsics, the sum should be 60. */
52 /* { dg-final { scan-assembler-times {\t.cfi_startproc\n\tret\n} 12 } } */
53 /* { dg-final { scan-assembler-times {\t.cfi_startproc\n} 60 } } */