This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/78185] Wrong branch optimization with -O1 on x86/x86_64
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 02 Nov 2016 14:27:02 +0000
- Subject: [Bug tree-optimization/78185] Wrong branch optimization with -O1 on x86/x86_64
- Auto-submitted: auto-generated
- References: <bug-78185-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78185
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Nope.
if (TREE_CODE (lhs) != SSA_NAME
|| gimple_could_trap_p (stmt))
return MOVE_PRESERVE_EXECUTION;
But then LIM fails to check whether the exit of the nested loop is ever taken
(it infinitely loops).
Thus that LIM logic has a flaw. It marks that block as always executed in the
outer loop. Thus the bug is in fill_always_executed_in[_1].
A tiny bit academic as it requires a never terminating inner loop, but well.