5 void __attribute__((noipa
))
6 f (int *restrict y
, int *restrict x
, int *restrict indices
)
8 for (int i
= 0; i
< N
; ++i
)
10 y
[i
* 2] = (indices
[i
* 2] < N
* 2
11 ? x
[indices
[i
* 2]] + 1
13 y
[i
* 2 + 1] = (indices
[i
* 2 + 1] < N
* 2
14 ? x
[indices
[i
* 2 + 1]] + 2
21 72704, 52152, 51301, 96681,
22 57937, 60490, 34504, 60944,
23 42225, 28333, 88336, 74300,
24 29250, 20484, 38852, 91536,
25 86917, 63941, 31590, 21998,
26 22419, 26974, 28668, 13968,
27 3451, 20247, 44089, 85521,
28 22871, 87362, 50555, 85939
30 int indices
[N
* 2] = {
31 15, 0x10000, 0xcafe0, 19,
33 0x20000, 0x70000, 15, 30,
40 int expected
[N
* 2] = {
42 60945, 28670, 21999, 52154,
44 60491, 29252, 74301, 74302,
45 88337, 20249, 60491, 22421,
46 28669, 3453, 1, 22873,
47 50556, 22000, 34505, 2,
48 60945, 29252, 42226, 26976
58 for (int i
= 0; i
< 32; ++i
)
59 if (y
[i
] != expected
[i
])
65 /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" vect { target { { vect_gather_load_ifn || avx2 } && vect_masked_load } } } } */