| 1 |
/* Make sure the vector load and zero instruction is being used for |
| 2 |
initializing a 32 bit vector with the first element taken from |
| 3 |
memory. */ |
| 4 |
|
| 5 |
/* { dg-do run } */ |
| 6 |
/* { dg-options "-O3 -mzarch -march=arch12 --save-temps" } */ |
| 7 |
/* { dg-require-effective-target s390_vxe } */ |
| 8 |
|
| 9 |
typedef unsigned int uv4si __attribute__((vector_size(16))); |
| 10 |
|
| 11 |
uv4si __attribute__((noinline)) |
| 12 |
foo (int *a) |
| 13 |
{ |
| 14 |
return (uv4si){ *a, 0, 0, 0 }; |
| 15 |
} |
| 16 |
|
| 17 |
int |
| 18 |
main () |
| 19 |
{ |
| 20 |
int b = 4; |
| 21 |
uv4si a = (uv4si){ 1, 2, 3, 4 }; |
| 22 |
|
| 23 |
a = foo (&b); |
| 24 |
|
| 25 |
if (a[0] != 4 || a[1] != 0 || a[2] != 0 || a[3] != 0) |
| 26 |
__builtin_abort (); |
| 27 |
|
| 28 |
return 0; |
| 29 |
} |
| 30 |
/* { dg-final { scan-assembler-times "vllezlf\t%v24,0\\(%r2\\)" 1 } } */ |