This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]