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]

Re: [PATCH 10/10] Port testsuite to GCN


I finally got back to investigating this ....

On 21/11/2018 01:00, Jeff Law wrote:
--- a/gcc/testsuite/gcc.dg/gimplefe-28.c
+++ b/gcc/testsuite/gcc.dg/gimplefe-28.c
@@ -1,5 +1,5 @@
  /* { dg-do compile { target sqrt_insn } } */
-/* { dg-options "-fgimple -O2" } */
+/* { dg-options "-fgimple -O2 -ffast-math" } */
So why does the GCN need fast-math here?  I'm not aware of any other
target  that needs that kind of handling to make this test work.

It needs it because the sqrt instruction is only enabled when flag_unsafe_math_optimizations is set. This seems appropriate given the approximate nature of the machine instruction.

This test uses gimple directly and so bypasses the usual optab checks that would normally select a library function instead, which results in an ICE.

It seems like a safe change to make, since most targets will have more patterns enabled, not fewer, in this mode.

The test will continue to fail on any target that does not have a sqrt instruction at all.

Andrew


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