This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/25243] [4.1/4.2 Regression] Jump threading opportunity missed in tree-ssa but caught in jump1



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]