| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target vect_int } */ |
| 3 |
/* { dg-require-effective-target vect_shift } */ |
| 4 |
|
| 5 |
int x[4]; |
| 6 |
int j[4]; |
| 7 |
void foo() |
| 8 |
{ |
| 9 |
x[0] = (x[0] << j[0]) + j[0]; |
| 10 |
x[1] = (x[1] << j[0]) + j[1]; |
| 11 |
x[2] = (x[2] << j[0]) + j[2]; |
| 12 |
x[3] = (x[3] << j[0]) + j[3]; |
| 13 |
} |
| 14 |
|
| 15 |
/* The scalar shift argument should be extracted from the available vector. */ |
| 16 |
/* { dg-final { scan-tree-dump "BIT_FIELD_REF" "slp2" { target sse2 } } } */ |
| 17 |
/* { dg-final { scan-tree-dump "optimized: basic block" "slp2" } } */ |