https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96807
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Division by zero is undefined behavior so we simplify 1/x to 0 if x is known to be not one [unless there's literal 1/0 which is sometimes used to generate traps].