[Bug middle-end/23294] fold does not fold a*C+a to a*(C+1) or a*C-a to a*(C-1)

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Aug 10 09:24:00 GMT 2005


------- 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



More information about the Gcc-bugs mailing list