This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/30322] ((-i-1) + i) +1) is turned into ~i + (i+1) and never into 0 on the tree level
- From: "rakdver at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jan 2007 15:30:17 -0000
- Subject: [Bug middle-end/30322] ((-i-1) + i) +1) is turned into ~i + (i+1) and never into 0 on the tree level
- References: <bug-30322-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from rakdver at gcc dot gnu dot org 2007-01-09 15:30 -------
(In reply to comment #6)
> It seems to be IVOPTs rewriting introduces the trees. Testcase:
Which happens because fold causes the number of iterations of the loop to be
something like e + ~f, and then is not able to deal with the expressions like
the one in the testcase. I will fix tree-affine to deal with this, but perhaps
it would be preferable not to perform this transformation in fold at all, and
leave it for simplification on rtl.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30322