https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106783
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jan Hubicka from comment #6) > The problem is that n/=0 is undefined behavior (so we can optimize out call > to function doing divide by zero), while __builtin_trap is observable and we > do not optimize out code paths that may trip to it. > > so isolate-paths is de-facto pesimizing code from this POV. It is used > __builtin_unreachable things would work. I think some parts of compiler use > __builtin_unreachable (such as loop unrolling) other __builtin_trap. It > would be nice to have consistent solution to this. Also see the discussion at https://gcc.gnu.org/pipermail/gcc/2024-June/244213.html .