| 1 |
/* Verify that overloaded built-ins for vec_pack with |
| 2 |
double inputs produce the right results. */ |
| 3 |
|
| 4 |
/* { dg-do compile } */ |
| 5 |
/* { dg-options "-mvsx -O2" } */ |
| 6 |
/* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */ |
| 7 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 8 |
|
| 9 |
#include <altivec.h> |
| 10 |
|
| 11 |
// vector float vec_pack (vector double, vector double); |
| 12 |
|
| 13 |
vector float |
| 14 |
test_pack (vector double vd2, vector double vd3) |
| 15 |
{ |
| 16 |
return vec_pack (vd2, vd3); |
| 17 |
} |
| 18 |
|
| 19 |
/* { dg-final { scan-assembler-times "vmrgew" 1 { target be } } } */ |
| 20 |
/* { dg-final { scan-assembler-times "vmrgow" 1 { target le } } } */ |