This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Skip floating-point var-expand tests for soft-float MIPS targets


-fvariable-expansion-in-unroller only considers cases where the
accumulator operations are native INSNs rather than libcalls.
This is good, because there is no pipelining benefit to the
optimisation when calls are used, and it simply introduces
more calls in the epilogue.  This patch therefore disables two
floating-point -fvariable-expansion-in-unroller tests on soft-float
MIPS targets.

Tested on x86_64-linux-gnu and mipsisa64-elf.  Applied.

Richard


gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_mips_soft_float):
	New procedure.
	* gcc.dg/var-expand1.c: Skip for mips_soft_float.
	* gcc.dg/pr30957-1.c: Likewise.

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	(revision 130319)
+++ gcc/testsuite/lib/target-supports.exp	(working copy)
@@ -615,6 +615,16 @@ proc check_effective_target_mpaired_sing
     } "-mpaired-single"]
 }
 
+# Return true if we're testing a soft-float MIPS target.
+
+proc check_effective_target_mips_soft_float { } {
+    return [check_no_compiler_messages mips_soft_float assembly {
+	#ifndef __mips_soft_float
+	#error FOO
+	#endif
+    }]
+}
+
 # Return true if the target is a 64-bit MIPS target.
 
 proc check_effective_target_mips64 { } {
Index: gcc/testsuite/gcc.dg/var-expand1.c
===================================================================
--- gcc/testsuite/gcc.dg/var-expand1.c	(revision 130319)
+++ gcc/testsuite/gcc.dg/var-expand1.c	(working copy)
@@ -1,4 +1,7 @@
 /* { dg-do compile } */
+/* We don't (and don't want to) perform this optimisation on soft-float
+   MIPS targets, where each addition is a library call.  */
+/* { dg-skip-if "" { mips_soft_float } { "*" } { "" } } */
 /* { dg-options "-O2 -funroll-loops --fast-math -fvariable-expansion-in-unroller -dL" } */
 
 extern void abort (void);
Index: gcc/testsuite/gcc.dg/pr30957-1.c
===================================================================
--- gcc/testsuite/gcc.dg/pr30957-1.c	(revision 130319)
+++ gcc/testsuite/gcc.dg/pr30957-1.c	(working copy)
@@ -1,4 +1,7 @@
 /* { dg-do run { xfail vax-*-* powerpc-*-*spe } } */
+/* We don't (and don't want to) perform this optimisation on soft-float
+   MIPS targets, where each addition is a library call.  */
+/* { dg-skip-if "" { mips_soft_float } { "*" } { "" } } */
 /* { dg-options "-O2 -funroll-loops -funsafe-math-optimizations -fvariable-expansion-in-unroller -dL" } */
 
 extern void abort (void);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]