https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67513
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Note, the asan pass emits the checks in the order of first testing for non-zero and then doing the sub-quadword comparison (if any), but uses bitwise and in between the two conditions and the choice to expand it this way is the expander and backend choice. To force the behavior you want we'd need to create explicit conditional jump around the second test in the IL.