https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119781
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- For LLVM to produce the bad code you might need -ftrapping-math which defaults to on for GCC while defaults to off for clang. That might be the reason why LLVM does not produce this instruction.