| 1 |
/* PR target/64821 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-O2 -fdump-tree-optimized" } */ |
| 4 |
/* Check that we constant fold sqrt(4.0) into 2.0. */ |
| 5 |
/* { dg-final { scan-tree-dump-not " \\\.SQRT" "optimized" } } */ |
| 6 |
/* { dg-final { scan-tree-dump " 2\\\.0e\\\+0" "optimized" } } */ |
| 7 |
/* { dg-final { scan-assembler-not "fsqrt" } } */ |
| 8 |
/* We should produce a fmov to d0 with 2.0 but currently don't, see PR 103959. */ |
| 9 |
/* { dg-final { scan-assembler-times "\n\tfmov\td0, 2.0e.0" 1 { xfail *-*-* } } } */ |
| 10 |
|
| 11 |
#include <arm_neon.h> |
| 12 |
|
| 13 |
float64x1_t f64(void) |
| 14 |
{ |
| 15 |
float64x1_t a = (float64x1_t){4.0}; |
| 16 |
return vsqrt_f64 (a); |
| 17 |
} |