1 /* { dg-require-effective-target vect_int } */
8 unsigned short X
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
)));
9 unsigned short Y
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
)));
10 unsigned int result
[N
];
12 /* short->int widening-mult */
13 __attribute__ ((noinline
)) int
17 /* Not vectorized because X[i] and Y[i] are casted to 'int'
18 so the widening multiplication pattern is not recognized. */
19 for (i
=0; i
<len
; i
++) {
20 result
[i
] = (unsigned int)(X
[i
] * Y
[i
]);
33 __asm__
volatile ("");
39 if (result
[i
] != X
[i
] * Y
[i
])
46 /*The induction loop is vectorized */
47 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail *-*-* } } } */
48 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_pack_trunc } } } */
49 /* { dg-final { cleanup-tree-dump "vect" } } */