[Bug middle-end/31029] Fold does not fold a + C == a
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Nov 2 16:09:00 GMT 2008
------- Comment #6 from rguenth at gcc dot gnu dot org 2008-11-02 16:08 -------
This is because fold doesn't fold ig_1 == 1 - ig_1 to a constant. Which is
just because it doesn't handle this canonical form but expects X +- CST always.
Fixing that makes the first forwprop pass optimize the comparison to false.
I have a patch, queued for 4.5.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Severity|normal |enhancement
Status|NEW |ASSIGNED
Component|tree-optimization |middle-end
Last reconfirmed|2008-08-28 15:40:02 |2008-11-02 16:08:21
date| |
Summary|missed optimization |Fold does not fold a + C ==
| |a
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31029
More information about the Gcc-bugs
mailing list