This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/25243] [4.1/4.2 Regression] Jump threading opportunity missed in tree-ssa but caught in jump1
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Dec 2005 17:46:28 -0000
- Subject: [Bug tree-optimization/25243] [4.1/4.2 Regression] Jump threading opportunity missed in tree-ssa but caught in jump1
- References: <bug-25243-280@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from steven at gcc dot gnu dot org 2005-12-03 17:46 -------
Actually, it's more related to Bug 21488. What happens is that we record a
value for the left hand side of a single-argument PHI node (i.e. for
"rhs=PHI(lhs)" we record an equivalence rhs==lhs), but the left hand side also
already has a value (in this case, lhs==4).
Later on we don't copy propagate lhs into the uses of rhs because lhs is
defined in a loop and we don't copy propagate out of loops, so we never see
that rhs==4 too.
My hack in comment #3 propagates the value "4" by following SSA_NAME_VALUE
links as deeply as possible. What we should probably do instead is look
through SSA_NAME_VALUE chains in record_equivalences_from_phis.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25243