https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90865
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- There is a way out of this. Defer building those conditionals till the sanopt pass, before that have new IFN_UBSAN_* internal calls in the IL like we already do with IFN_UBSAN_{NULL,BOUNDS,OBJECT_SIZE,PTR,VPTR}. Another advantage of doing that would be we would create the ubsan data only for code that actuall survives till the sanopt pass and is not optimized away before that.