3 /* This is a load-lane / masked-store-lane test that more reliably
4 triggers SLP than SVEs mask_srtuct_store_*.c */
6 void __attribute__ ((noipa
))
7 test4 (int *__restrict dest
, int *__restrict src
,
8 int *__restrict cond
, int bias
, int n
)
10 for (int i
= 0; i
< n
; ++i
)
12 int value0
= src
[i
* 4] + bias
;
13 int value1
= src
[i
* 4 + 1] * bias
;
14 int value2
= src
[i
* 4 + 2] + bias
;
15 int value3
= src
[i
* 4 + 3] * bias
;
19 dest
[i
* 4 + 1] = value1
;
20 dest
[i
* 4 + 2] = value2
;
21 dest
[i
* 4 + 3] = value3
;
29 const int dest_chk
[16*4] = {0, 0, 0, 0, 9, 25, 11, 35, 0, 0, 0, 0, 17, 65, 19,
30 75, 0, 0, 0, 0, 25, 105, 27, 115, 0, 0, 0, 0, 33, 145, 35, 155, 0, 0, 0,
31 0, 41, 185, 43, 195, 0, 0, 0, 0, 49, 225, 51, 235, 0, 0, 0, 0, 57, 265, 59,
32 275, 0, 0, 0, 0, 65, 305, 67, 315};
38 for (int i
= 0; i
< 16; ++i
)
41 for (int i
= 0; i
< 16 * 4; ++i
)
43 test4 (dest
, src
, cond
, 5, 16);
45 for (int i
= 0; i
< 16 * 4; ++i
)
46 if (dest
[i
] != dest_chk
[i
])
51 /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target { vect_variable_length && vect_load_lanes } } } } */