1 /* { dg-do compile } */
6 f1 (int *restrict y
, int *restrict x1
, int *restrict x2
,
9 for (int i
= 0; i
< N
; ++i
)
11 y
[i
* 2] = (indices
[i
* 2] < N
* 2
12 ? x1
[indices
[i
* 2]] + 1
14 y
[i
* 2 + 1] = (indices
[i
* 2 + 1] < N
* 2
15 ? x2
[indices
[i
* 2 + 1]] + 2
21 f2 (int *restrict y
, int *restrict x
, int *restrict indices
)
23 for (int i
= 0; i
< N
; ++i
)
25 y
[i
* 2] = (indices
[i
* 2] < N
* 2
26 ? x
[indices
[i
* 2]] + 1
28 y
[i
* 2 + 1] = (indices
[i
* 2 + 1] < N
* 2
29 ? x
[indices
[i
* 2 + 1] * 2] + 2
35 f3 (int *restrict y
, int *restrict x
, int *restrict indices
)
37 for (int i
= 0; i
< N
; ++i
)
39 y
[i
* 2] = (indices
[i
* 2] < N
* 2
40 ? x
[indices
[i
* 2]] + 1
42 y
[i
* 2 + 1] = (((unsigned int *)indices
)[i
* 2 + 1] < N
* 2
43 ? x
[((unsigned int *) indices
)[i
* 2 + 1]] + 2
48 /* We do not want to see a two-lane .MASK_LOAD or .MASK_GATHER_LOAD since
49 the gathers are different on each lane. This is a bit fragile and
50 should possibly be turned into a runtime test. */
51 /* { dg-final { scan-tree-dump-not "stmt 1 \[^\r\n\]* = .MASK" vect } } */