| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O3 -march=z14 -mzarch -mzvector --save-temps" } */ |
| 3 |
/* { dg-do run { target { s390_z14_hw } } } */ |
| 4 |
|
| 5 |
/* |
| 6 |
* The vector intrinsic vec_doublee(a) converts the even-indexed |
| 7 |
* single-precision numbers in a vector to double precision. |
| 8 |
*/ |
| 9 |
#include <assert.h> |
| 10 |
#include <vecintrin.h> |
| 11 |
|
| 12 |
int |
| 13 |
main (void) |
| 14 |
{ |
| 15 |
vector float in = { 1.0, 2.0, 3.0, 4.0 }; |
| 16 |
|
| 17 |
vector double result = vec_doublee(in); |
| 18 |
/* { dg-final { scan-assembler-times {\n\tvldeb} 1 } } */ |
| 19 |
|
| 20 |
assert(result[0] == (double)in[0]); |
| 21 |
assert(result[1] == (double)in[2]); |
| 22 |
} |