[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass<cutoffs> (PR #124857)
Thurston Dang via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 29 10:57:03 PST 2025
================
@@ -3614,29 +3614,35 @@ void CodeGenFunction::EmitCheck(
llvm::Value *RecoverableCond = nullptr;
llvm::Value *TrapCond = nullptr;
bool NoMerge = false;
+ // Expand checks into:
+ // (Check1 || !allow_ubsan_check) && (Check2 || !allow_ubsan_check) ...
+ // We need separate allow_ubsan_check intrinsics because they have separately
+ // specified cutoffs.
+ // This expression looks expensive but will be simplified after
+ // LowerAllowCheckPass.
+ static const double SanitizerMaskCutoffsEps = 0.000000001f;
for (auto &[Check, Ord] : Checked) {
+ llvm::Value *GuardedCheck = Check;
----------------
thurstond wrote:
Check can't be modified because of the const type of the structured binding (`auto &[Check, Ord]`)
https://github.com/llvm/llvm-project/pull/124857
More information about the cfe-commits
mailing list