https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95393
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- It does optimize for me with -O2 or -O3. It could optimize earlier though, by the end of gimple, we are still trying to return max(s,0).