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: PR 35232: Recent regression due to reload inheritance bug


Jakub Jelinek <jakub@redhat.com> writes:
> Is your inline asm testcase working with the same options in 4.2 (i.e. is
> the reload inheritance bug a regression), or is the only regression
> that fp-int-convert-double now triggers it?

The only regression is the fp-int-convert-double thing.  The inline asm
testcase failed for 4.2 and 4.1, and probably long before that.

> If I see the same bug as you in my x86_64-linux -> mipsisa64-elf
> cross, then you need a lot of different fp conversions together to trigger
> it and without volatile being used in almost all places it doesn't trigger
> either.  Perhaps I haven't minimized it completely, but at -O0 I count
> 8 different __mips16_float*df calls and 5 different __mips16_fix_*df, if I
> remove further code it doesn't trigger any more.  Is this something that
> could hit people on real-world code?

TBH, I'm not sure whether it's likely or not.  The failure happens at -O2
and above for both fp-int-convert-double.c and fp-int-convert-float.c[*].
I realise that the two tests have the same structure, but even so,
I'm used to seeing reload bugs affect one optimisation option only,
and to be sensitive to the sizes of the types involved.  That's what
made me a bit nervous about user-visible impact.  On the other hand,
I agree the volatiles are unusual, and they probably make -O2 and -O3
pretty much equivalent.

[*] and fp-int-convert-long-double.c as well, but long double == double,
    so that's not really relevant.

> If your reload patch is tested sufficiently on the trunk for a while,
> then I think it can be backported for 4.3.1, I just believe it is too
> late for such reload patches before the release.

Understood.

> Punishing all targets because of this is IMHO undesirable, so we either
> put a MIPS special-casing in optabs.c for MIPS, or XFAIL this test for
> mips.

OK, so in summary: if the reload patch stands the test of time on mainline,
it'll be OK to backport to 4.3.1?  If so, I'm happy skipping the test
for MIPS16 targets for 4.3.0.  (I suppose we'll have to skip it rather
than XFAIL it given that it's an ICE.)

Patch tested on mipsisa64-elfoabi and x86_64-linux-gnu (making sure it's
skipped for MIPS16 and not otherwise).  OK for 4.3?

Richard


gcc/testsuite/
	PR rtl-optimization/35232
	* gcc.dg/torture/fp-int-convert-float.c: Skip for MIPS16 targets.
	* gcc.dg/torture/fp-int-convert-double.c: Likewise.
	* gcc.dg/torture/fp-int-convert-long-double.c: Likewise.

Index: gcc/testsuite/gcc.dg/torture/fp-int-convert-float.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/fp-int-convert-float.c	(revision 132382)
+++ gcc/testsuite/gcc.dg/torture/fp-int-convert-float.c	(working copy)
@@ -1,6 +1,7 @@
 /* Test floating-point conversions.  Standard types and float.  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
-/* { dg-do run } */
+/* Skipped for MIPS16 targets because of PR 35232 */
+/* { dg-do run { target { { ! mips*-*-* } || nomips16 } } } */
 /* { dg-options "" } */
 
 #include <float.h>
Index: gcc/testsuite/gcc.dg/torture/fp-int-convert-long-double.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/fp-int-convert-long-double.c	(revision 132382)
+++ gcc/testsuite/gcc.dg/torture/fp-int-convert-long-double.c	(working copy)
@@ -1,6 +1,7 @@
 /* Test floating-point conversions.  Standard types and long double.  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
-/* { dg-do run } */
+/* Skipped for MIPS16 targets because of PR 35232 */
+/* { dg-do run { target { { ! mips*-*-* } || nomips16 } } } */
 /* { dg-options "" } */
 
 #include <float.h>
Index: gcc/testsuite/gcc.dg/torture/fp-int-convert-double.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/fp-int-convert-double.c	(revision 132382)
+++ gcc/testsuite/gcc.dg/torture/fp-int-convert-double.c	(working copy)
@@ -1,6 +1,7 @@
 /* Test floating-point conversions.  Standard types and double.  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
-/* { dg-do run } */
+/* Skipped for MIPS16 targets because of PR 35232 */
+/* { dg-do run { target { { ! mips*-*-* } || nomips16 } } } */
 /* { dg-options "" } */
 
 #include <float.h>


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