public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] XFAIL PR65917
@ 2015-04-29  8:53 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2015-04-29  8:53 UTC (permalink / raw)
  To: gcc-patches


The testcase gcc.dg/tree-ssa/20030922-2.c FAILs on m68k (and possibly
elsewhere), not on x86_64 though.

So on x86_64 ifcombine has "removed" the if but after dom1 we still have

  _14 = *_13;
  if (_8 != _14)
    goto <bb 3>;
  else
    goto <bb 5>;

  <bb 3>:
  target_bb.1_15 = target_bb;
  _16 = _8 != target_bb.1_15;
  _17 = _14 == target_bb.1_15;
  _18 = _16 & _17;
  if (_18 != 0)

which shows that running ifcombine before DOM might not be the best idea.

It also shows that the testcase should disable ifcombine to really test 
what it was supposed to test.  And then it also fails on x86_64.

VRP does optimize this case because it has a more powerful way to track
equivalences (and does a quadratic job in trying to simplify compares 
using
all equivalences of the lhs vs all equivalences of the rhs).

Which is another hint at the fact that DOM maybe shouldn't treat 
equivalences
derived from conditionals in the SSA_VALUE table where you can't really 
record
both _14 = target_bb.1_15 and target_bb.1_15 = _14 (which would get you a
nice cycle there).

For the existing way of DOM handlign this I don't see anything in the 
testcase
that could be used to build a new heuristic (in fact another heuristic
would say that what we do now is good -- _14 dies at the point where we
build the equivalency, target_bb.1_15 does not, so we don't want to 
propagate
_14 because that will increase its lifetime!)

So the following "fixes" the testcase to also FAIL on x86_64 and
XFAILs it.

Tested on x86_64, applied.

Richard.

2015-04-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/65917
	* gcc.dg/tree-ssa/20030922-2.c: Disable ifcombine and XFAIL.

Index: gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c	(revision 222560)
+++ gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-dom1" } */
+/* { dg-options "-O1 -fdump-tree-dom1 -fdisable-tree-ifcombine" } */
 
 struct rtx_def;
 typedef struct rtx_def *rtx;
@@ -20,5 +20,9 @@ rgn_rank (rtx insn1, rtx insn2)
 }
 
 /* There should be two IF conditionals.  */
-/* { dg-final { scan-tree-dump-times "if " 2 "dom1" } } */
+/* This now fails as it requires a very specific decision of DOM which
+   SSA name to record as a copy of the other when DOM derives copies
+   from temporary equivalences.  The heuristics there no longer do
+   the correct thing.  VRP still optimizes this testcase.  */
+/* { dg-final { scan-tree-dump-times "if " 2 "dom1" { xfail *-*-* } } } */
 /* { dg-final { cleanup-tree-dump "dom1" } } */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-29  8:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-29  8:53 [PATCH] XFAIL PR65917 Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).