This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/23294] fold does not fold a*C+a to a*(C+1) or a*C-a to a*(C-1)
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Aug 2005 09:23:07 -0000
- Subject: [Bug middle-end/23294] fold does not fold a*C+a to a*(C+1) or a*C-a to a*(C-1)
- References: <20050809030649.23294.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-08-10 09:23 -------
I believe we can only do so for -fwrapv (but we don't) or for unsigned (which we
also don't do). I may look at this somewhen in the future.
We also don't canonicalize
int f(int a)
{
return a + a + a;
}
which I believe we did at some time?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23294