Use gather loads for strided accesses
[official-gcc.git] / gcc / testsuite / gcc.target / arc / pr9000674901.c
blob2a15c1c1478e799f8358c315f47646982dd833c9
1 /* { dg-do compile } */
2 /* { dg-skip-if "" { ! { clmcpu } } } */
3 /* { dg-options "-mcpu=arc700 -O2 -fpic" } */
5 /* Test if the compiler generates a constant address having that uses
6 a neg keyword on the pic unspec. */
8 typedef unsigned int uint32_t;
9 typedef unsigned char uint8_t;
10 typedef unsigned short int uint16_t;
11 typedef unsigned long long int uint64_t;
13 enum type {
14 t_undef = 0x01,
15 t_group = 0x02,
16 t_partition = 0x04,
17 t_spare = 0x08,
18 t_linear = 0x10,
19 t_raid0 = 0x20,
20 t_raid1 = 0x40,
21 t_raid4 = 0x80,
22 t_raid5_ls = 0x100,
23 t_raid5_rs = 0x200,
24 t_raid5_la = 0x400,
25 t_raid5_ra = 0x800,
26 t_raid6 = 0x1000,
29 struct raid_set {
30 enum type type;
33 void
34 _find_factors (struct raid_set *rs, uint8_t * div, uint8_t * sub)
36 struct factors {
37 const uint8_t level;
38 const uint8_t div, sub;
40 static struct factors factors[] = {
41 {0, 1, 0},
42 {1, 2, 0},
43 {2, 2, 0},
44 {5, 1, 1},
46 struct factors *f = (factors + (sizeof (factors) / sizeof (*factors)));
48 while (f-- > factors) {
49 if (rs->type == f->level) {
50 *div = f->div;
51 *sub = f->sub;
52 return;
56 *div = 1;
57 *sub = 0;