This is the mail archive of the gcc-patches@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]

Re: [PATCH] Fix optimization regression in constant folder


> E.g. one transformation it does is (X*c1)/c2 to X*(c1/c2) if c1%c2==0, for 
> sizetypes (und OVERFLOW_UNDEFINED ones).
> 
> Suppose that X is the latter part of Marks reassociated expression, C-B, 
> with B large, so that (C-B)*c1 would overflow.

I'm having trouble following your example.  It seems it would be converting
an expression that *did* overflow into one that doesn't.  Indeed, how could
it ever be doing otherwise since the product is always smaller in the
resulting transformation.


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