I can't find a bug here, apart from perhaps that the test case (gcc/testsuite/gcc.target/arm/neon-load-df0.c) is not written very robustly. The compiler is making a sane choice when compiling that test: there's no particular need to use a NEON register for the operation in question, whether or not the hard-float ABI is in use. An alternative test case, e.g. simply:
double bar ()
{
return 0.0;
}
compiled with -mfloat-abi=hard, reveals that the load-double-zero patch does work correctly (in a case where using a NEON register is definitely beneficial).
I can't find a bug here, apart from perhaps that the test case (gcc/testsuite/ gcc.target/ arm/neon- load-df0. c) is not written very robustly. The compiler is making a sane choice when compiling that test: there's no particular need to use a NEON register for the operation in question, whether or not the hard-float ABI is in use. An alternative test case, e.g. simply:
double bar ()
{
return 0.0;
}
compiled with -mfloat-abi=hard, reveals that the load-double-zero patch does work correctly (in a case where using a NEON register is definitely beneficial).