| 1 |
/* { dg-do compile { target { ! riscv_abi_e } } } */ |
| 2 |
/* { dg-add-options "riscv_v" } */ |
| 3 |
/* { dg-additional-options "-mrvv-vector-bits=scalable -fno-vect-cost-model -fdump-tree-slp-details" } */ |
| 4 |
|
| 5 |
int x[8]; |
| 6 |
int y[8]; |
| 7 |
|
| 8 |
void foo () |
| 9 |
{ |
| 10 |
x[0] = __builtin_popcount (y[0]); |
| 11 |
x[1] = __builtin_popcount (y[1]); |
| 12 |
x[2] = __builtin_popcount (y[2]); |
| 13 |
x[3] = __builtin_popcount (y[3]); |
| 14 |
x[4] = __builtin_popcount (y[4]); |
| 15 |
x[5] = __builtin_popcount (y[5]); |
| 16 |
x[6] = __builtin_popcount (y[6]); |
| 17 |
x[7] = __builtin_popcount (y[7]); |
| 18 |
} |
| 19 |
|
| 20 |
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "slp2" } } */ |
| 21 |
/* { dg-final { scan-assembler "vcpop.v" { target { riscv_zvbb } } } } */ |