| 1 |
/* { dg-do compile } */ |
| 2 |
/* Disable for vectorization using partial vectors since it would have only |
| 3 |
one iteration left, consequently BB vectorization won't happen. */ |
| 4 |
/* { dg-additional-options "-O3 --param=vect-partial-vector-usage=0" } */ |
| 5 |
/* { dg-require-effective-target vect_unpack } */ |
| 6 |
|
| 7 |
#include "tree-vect.h" |
| 8 |
|
| 9 |
#if VECTOR_BITS > 512 |
| 10 |
#define N (VECTOR_BITS * 10 / 16) |
| 11 |
#else |
| 12 |
#define N 320 |
| 13 |
#endif |
| 14 |
|
| 15 |
void foo(unsigned *p1, unsigned short *p2) |
| 16 |
{ |
| 17 |
int n; |
| 18 |
for (n = 0; n < N; n++) |
| 19 |
p1[n] = p2[n * 2]; |
| 20 |
} |
| 21 |
|
| 22 |
/* Disable for SVE because for long or variable-length vectors we don't |
| 23 |
get an unrolled epilogue loop. Also disable for AArch64 Advanced SIMD, |
| 24 |
because there we can vectorize the epilogue using mixed vector sizes. |
| 25 |
Likewise for AMD GCN and RVV. */ |
| 26 |
/* { dg-final { scan-tree-dump "BB vectorization with gaps at the end of a load is not supported" "slp1" { target { { ! aarch64*-*-* } && { { ! amdgcn*-*-* } && { ! riscv_v } } } } } } */ |