[Bug tree-optimization/78185] Wrong branch optimization with -O1 on x86/x86_64

2016-11-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78185 --- Comment #7 from Richard Biener --- Author: rguenth Date: Fri Nov 4 08:54:42 2016 New Revision: 241841 URL: https://gcc.gnu.org/viewcvs?rev=241841&root=gcc&view=rev Log: 2016-11-04 Richard Biener PR middle-end/78185 * loo

[Bug tree-optimization/78185] Wrong branch optimization with -O1 on x86/x86_64

2016-11-02 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78185 --- Comment #6 from Eric Botcazou --- > I suppose the easiest would be to simply not try moving trapping invariants > in RTL invariant motion, it looks hardly useful after GIMPLE was here... IIRC last time someone tried, this badly regressed gzi

[Bug tree-optimization/78185] Wrong branch optimization with -O1 on x86/x86_64

2016-11-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78185 --- Comment #4 from Richard Biener --- Better patch (question answered, we walk all BBs of each loop, thus BBs in sub-loop multiple times, and no, finite_loop_p would not catch infinite subloops): diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-s

[Bug tree-optimization/78185] Wrong branch optimization with -O1 on x86/x86_64

2016-11-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78185 --- Comment #5 from Richard Biener --- So for RTL the same issue exists - the always_reached computation is wrong. I suppose the easiest would be to simply not try moving trapping invariants in RTL invariant motion, it looks hardly useful after

[Bug tree-optimization/78185] Wrong branch optimization with -O1 on x86/x86_64

2016-11-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78185 Richard Biener changed: What|Removed |Added CC||ebotcazou at gcc dot gnu.org --- Commen

[Bug tree-optimization/78185] Wrong branch optimization with -O1 on x86/x86_64

2016-11-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78185 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug tree-optimization/78185] Wrong branch optimization with -O1 on x86/x86_64

2016-11-02 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78185 Marc Glisse changed: What|Removed |Added Keywords||wrong-code Status|UNCONFIRMED