1 /* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_p9vector_ok } */
3 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
4 /* { dg-options "-mcpu=power9 -O2" } */
6 /* Check code generation for direct move for long types. */
9 test (vector
double *p
)
11 vector
double v1
= *p
;
16 /* Force memory -> FPR load. */
17 __asm__ (" # reg %x0" : "+d" (v1
));
19 /* force VSX -> GPR direct move. */
21 __asm__ (" # reg %0" : "+r" (v2
));
23 /* Force GPR -> Altivec direct move. */
25 __asm__ (" # reg %x0" : "+v" (v3
));
29 /* { dg-final { scan-assembler "mfvsrd" } } */
30 /* { dg-final { scan-assembler "mfvsrld" } } */
31 /* { dg-final { scan-assembler "mtvsrdd" } } */