https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113878
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Different instrumentations are done at different times. Some ubsan instrumentations are already done in the FEs (e.g. shifts, division, ...), others are added in the ubsan pass (the idea is that catching up all the spots where the FE emits e.g. undefined overflow additions etc. is really hard, unlike the shifts or divisions there are hundreds of spots and we want to catch even what is added e.g. during gimplification). Still, the ubsan pass is fairly early. asan is far later, ditto tsan. The warning case wouldn't get better by instrumenting additions/subtractions/multiplications already in the FEs, it would be exactly the same.