Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / slp-9.c
blobd0c94f1986b799eee70c273e208534ab39688a61
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fno-early-inlining" } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 64
9 short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
10 short Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
11 int result[N];
13 /* short->int widening-mult */
14 int
15 foo1(int len) {
16 int i;
18 for (i=0; i<len/2; i++) {
19 result[2*i] = X[2*i] * Y[2*i];
20 result[2*i+1] = X[2*i+1] * Y[2*i+1];
24 int main (void)
26 int i;
28 check_vect ();
30 for (i=0; i<N; i++) {
31 X[i] = i;
32 Y[i] = 64-i;
33 __asm__ volatile ("");
36 foo1 (N);
38 for (i=0; i<N; i++) {
39 if (result[i] != X[i] * Y[i])
40 abort ();
43 return 0;
46 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_hi_to_si } } }*/
47 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_widen_mult_hi_to_si } } } */