This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/81556] [7/8 Regression] Wrong code at -O2
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Jul 2017 10:07:00 +0000
- Subject: [Bug tree-optimization/81556] [7/8 Regression] Wrong code at -O2
- Auto-submitted: auto-generated
- References: <bug-81556-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81556
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 41832
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41832&action=edit
gcc8-pr81556.patch
Untested fix. The current code whether a SSA_NAME can be reused or not is
based on whether all the rhs2 ops are the same from the toplevel stmt (and
whether there is powi/negate). That should work fine as long as the number of
ops is the same after optimization, but in this case there is a removal of
reduncant op, at which point that doesn't work anymore.