This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29715] fold produces &a - 4
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2007 07:01:04 -0000
- Subject: [Bug middle-end/29715] fold produces &a - 4
- References: <bug-29715-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-02-27 07:01 -------
Before we would produce:
i = &a + 12B;
i = i - 4B;
D.1616 = &a - 4B;
if (i > D.1616)
Now we produce:
i = &a + 12B;
D.1620 = i > &a;
i = i - 4B;
if (D.1620)
Which is better because we can actually fold it down to return 0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29715