[gcc(refs/users/aoliva/heads/testme)] [testsuite] [ppc] add -mdejagnu-cpu=power7 to pr17381.c
Alexandre Oliva
aoliva@gcc.gnu.org
Tue Feb 10 04:42:57 GMT 2026
https://gcc.gnu.org/g:75f48bdc1051407c5f3cbb82a051cd7910fb7d49
commit 75f48bdc1051407c5f3cbb82a051cd7910fb7d49
Author: Alexandre Oliva <oliva@adacore.com>
Date: Thu May 8 02:17:58 2025 -0300
[testsuite] [ppc] add -mdejagnu-cpu=power7 to pr17381.c
Below power7, it seems to be more profitable to compress the
floating-point constants and use an additional fp register move to
"extend" it. Only at power7 and above do we keep the constants
separate and load them, getting to the expected 'fmr' count.
for gcc/testsuite/ChangeLog
* gcc.target/powerpc/pr17381.c: Compile for power7. Justify.
Diff:
---
gcc/testsuite/gcc.target/powerpc/pr17381.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/powerpc/pr17381.c b/gcc/testsuite/gcc.target/powerpc/pr17381.c
index e6222c130af1..b137c687776e 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr17381.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr17381.c
@@ -1,6 +1,8 @@
/* PR target/17381 - Unnecessary register move for float extend */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-mdejagnu-cpu=power7 -O2" } */
+/* Up to power6, we compress the floating-point constant 1.0 and share it with
+ 1.0f, but the float_extend comes out as a second fmr. */
double d;
float test1(float fParm)
More information about the Gcc-cvs
mailing list