1 /* { dg-do run { target aarch64_sve_hw } } */
2 /* { dg-options "-O3 -fno-tree-loop-distribute-patterns" } */
6 #define TEST_SET_IMM(TYPE, IMM, SUFFIX) \
8 TYPE v[NUM_ELEMS (TYPE)]; \
9 set_##TYPE##_##SUFFIX (v); \
10 for (int i = 0; i < NUM_ELEMS (TYPE); i++) \
11 if (v[i] != (TYPE) IMM) \
15 int __attribute__ ((optimize (1)))
16 main (int argc
, char **argv
)
18 TEST_SET_IMM (int8_t, 0, imm_0
)
19 TEST_SET_IMM (int16_t, 0, imm_0
)
20 TEST_SET_IMM (int32_t, 0, imm_0
)
21 TEST_SET_IMM (int64_t, 0, imm_0
)
23 TEST_SET_IMM (int8_t, -1, imm_m1
)
24 TEST_SET_IMM (int16_t, -1, imm_m1
)
25 TEST_SET_IMM (int32_t, -1, imm_m1
)
26 TEST_SET_IMM (int64_t, -1, imm_m1
)
28 TEST_SET_IMM (int8_t, 1, imm_1
)
29 TEST_SET_IMM (int16_t, 1, imm_1
)
30 TEST_SET_IMM (int32_t, 1, imm_1
)
31 TEST_SET_IMM (int64_t, 1, imm_1
)
33 TEST_SET_IMM (int8_t, 127, imm_127
)
34 TEST_SET_IMM (int16_t, 127, imm_127
)
35 TEST_SET_IMM (int32_t, 127, imm_127
)
36 TEST_SET_IMM (int64_t, 127, imm_127
)
38 TEST_SET_IMM (int8_t, -128, imm_m128
)
39 TEST_SET_IMM (int16_t, -128, imm_m128
)
40 TEST_SET_IMM (int32_t, -128, imm_m128
)
41 TEST_SET_IMM (int64_t, -128, imm_m128
)
43 TEST_SET_IMM (int16_t, 256, imm_256
)
44 TEST_SET_IMM (int32_t, 256, imm_256
)
45 TEST_SET_IMM (int64_t, 256, imm_256
)
47 TEST_SET_IMM (int16_t, 32512, imm_32512
)
48 TEST_SET_IMM (int32_t, 32512, imm_32512
)
49 TEST_SET_IMM (int64_t, 32512, imm_32512
)
51 TEST_SET_IMM (int16_t, -32768, imm_m32768
)
52 TEST_SET_IMM (int32_t, -32768, imm_m32768
)
53 TEST_SET_IMM (int64_t, -32768, imm_m32768
)
55 TEST_SET_IMM (int16_t, 0x0101, imm_01_pat
)
56 TEST_SET_IMM (int32_t, 0x01010101, imm_01_pat
)
57 TEST_SET_IMM (int64_t, 0x0101010101010101LL
, imm_01_pat
)
59 TEST_SET_IMM (int32_t, 0x00010001, imm_0001_pat
)
60 TEST_SET_IMM (int64_t, 0x0001000100010001LL
, imm_0001_pat
)
62 TEST_SET_IMM (int16_t, 0xFEFE, imm_FE_pat
)
63 TEST_SET_IMM (int32_t, 0xFEFEFEFE, imm_FE_pat
)
64 TEST_SET_IMM (int64_t, 0xFEFEFEFEFEFEFEFE, imm_FE_pat
)
66 TEST_SET_IMM (int32_t, 0xFE00FE00, imm_FE00_pat
)
67 TEST_SET_IMM (int64_t, 0xFE00FE00FE00FE00, imm_FE00_pat
)