On 8/22/2026 8:17 PM, Andrea Pinski wrote:

This was https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118072 . Where I
even found out the change that introduced the issue was from 1998.
I did mention maybe we should even reset this caching between bbs even.
 From what I can tell this was done to try to catch the case of % and /
being used in the same bb to be able to reuse the division already.\
Ah.  Close but not quite right on when the cache was introduced. Dominic's change ought to fix 118072 or at least some instances of that problem.

And in the case of % and / being used in the same function, then we'd want to reduce the cost of the 2nd operation since it'll be able to reuse the output of the first operation to simplify the second operation.  So perhaps the cache still has some value -- I was thinking more in terms of compile-time cost.

jeff

Reply via email to