[Bug tree-optimization/47835] FAIL: gcc.dg/pr46909.c scan-tree-dump ifcombine "optimizing two comparisons to x_[0-9]+\(D\) != 4"

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 22 13:04:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47835

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-22 12:55:45 UTC ---
Created attachment 23434
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23434
gcc46-pr47835.patch

I guess instead of XFAILing it is better just to check the end result, whether
tree passes optimized this into x != 4 test in the end or not.  And they
actually do (with the exception of x86_64/i686 and maybe other targets before
PR46909 fix).  For ppc ifcombine only optimizes x != 6 || x == 2 into
x != 6 (that's why it reports that it optimized two comparisons into x != 6),
the reason why it doesn't optimize further is that x == 6 check has two preds,
one is x != 4 && x != 6 and the other one is !(x != 4) (one edge has moved from
x == 2 check to x == 6 during vrp1).  dom manages to optimize it though.



More information about the Gcc-bugs mailing list