Hi! On Fri, Jul 18, 2025 at 11:55:28AM -0500, Segher Boessenkool wrote: > > > There aren't many examples like this in the code base today, perhaps > > > because -fwrapv is not the default and any such optimization would not > > > get used much. But here's one: > > There isn't much in the GCC code that deals with -fwrapv at all. > "grep flag_wrapv" finds 29 occurrences only, and 3 more in config/ (all > for Andes). And the point there is that many Andes instructions always do saturation in hardware (just like many DSPs always have done), so it is incorrect to expect wrapping behaviour, it won't happen after all :-) Segher