| 1 |
/* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */ |
| 2 |
/* { dg-options "-mvsx -O2 -mfloat128" } */ |
| 3 |
/* { dg-additional-options "-mdejagnu-cpu=power9" { target { ! has_arch_pwr9 } } } */ |
| 4 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 5 |
|
| 6 |
/* PR 81959, the compiler raised on unrecognizable insn message in converting |
| 7 |
int to __float128, where the int had a PRE_INC in the address. */ |
| 8 |
|
| 9 |
#ifndef ARRAY_SIZE |
| 10 |
#define ARRAY_SIZE 1024 |
| 11 |
#endif |
| 12 |
|
| 13 |
void |
| 14 |
convert_int_to_float128 (__float128 * __restrict__ p, |
| 15 |
int * __restrict__ q) |
| 16 |
{ |
| 17 |
unsigned long i; |
| 18 |
|
| 19 |
for (i = 0; i < ARRAY_SIZE; i++) |
| 20 |
p[i] = (__float128)q[i]; |
| 21 |
} |
| 22 |
|
| 23 |
/* { dg-final { scan-assembler {\mlfiwax\M|\mlxsiwax\M} } } */ |
| 24 |
/* { dg-final { scan-assembler {\mxscvsdqp\M} } } */ |
| 25 |
/* { dg-final { scan-assembler-not {\mmtvsrd\M} } } */ |
| 26 |
/* { dg-final { scan-assembler-not {\mmtvsrw[sz]\M} } } */ |