https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79265
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- Btw, for targets which default to -fno-delete-null-pointer-checks nonnull sanitizing is of course pointless. I think we should simply make sure to instrument early enough before things are folded... or should restore -fdelete-null-pointer-checks after instrumentation. We also instrument <bb 3> [0.00%]: if ("%%" == 0B) goto <bb 6>; [0.04%] else goto <bb 5>; [99.96%] <bb 6> [0.00%]: __builtin___ubsan_handle_nonnull_arg (&*.Lubsan_data1); instrumenting "%%" looks pointless (again, instrumentation itself can rely on -fdelete-null-pointer-checks semantics when deciding to elide null pointer checks).