This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/45522] VRP misses oppurtunity for statement folding.
- From: "hubicka at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Sep 2010 13:51:58 -0000
- Subject: [Bug tree-optimization/45522] VRP misses oppurtunity for statement folding.
- References: <bug-45522-176@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from hubicka at gcc dot gnu dot org 2010-09-04 13:51 -------
Hi,
thanks. In meantime I made tree-ssa-pre to fold statements it produces and it
gets me to bootstrapland with sanity check in expr.c except for Ada (with the
patches I sent so far)
So it seems that I need to basically duplicate all logic for initializer
folding from tree-ssa-ccp.c into this function, right? I guess it makes sense,
but it is all quite ugly.
On VN side, i wondered if we can retire more of expand this way. For example
dojump knows that:
a = b ror x;
if (a != 0)
can be folded into:
if (b != 0)
(ror is rotation). I guess we should do this kind of tricks in VN instead?
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45522