1 /* { dg-require-effective-target vect_int } */
12 void foo (short * __restrict__ dst
, short * __restrict__ src
, int h
,
17 for (i
= 0; i
< h
; i
++)
19 dst
[0] = A
*src
[0] + B
*src
[1];
20 dst
[1] = A
*src
[1] + B
*src
[2];
21 dst
[2] = A
*src
[2] + B
*src
[3];
22 dst
[3] = A
*src
[3] + B
*src
[4];
23 dst
[4] = A
*src
[4] + B
*src
[5];
24 dst
[5] = A
*src
[5] + B
*src
[6];
25 dst
[6] = A
*src
[6] + B
*src
[7];
26 dst
[7] = A
*src
[7] + B
*src
[8];
29 asm volatile ("" ::: "memory");
40 for (i
= 0; i
< N
; i
++)
49 for (i
= 0; i
< N
/2; i
++)
51 if (dst
[i
] != A
* src
[i
] + B
* src
[i
+1])
58 /* Exclude POWER8 (only POWER cpu for which vect_element_align is true)
59 because loops have vectorized before SLP gets a shot. */
60 /* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "slp1" { target { { vect_int_mult && vect_element_align } && { ! powerpc*-*-* } } } } } */