[llvm] [LowerAllowCheck] preserve CFG analyses (PR #145816)
    Florian Mayer via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jun 25 16:55:00 PDT 2025
    
    
  
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/145816
None
>From 41e87d8c3ec577817f1a24d6caf5870d396bcb48 Mon Sep 17 00:00:00 2001
From: Florian Mayer <fmayer at google.com>
Date: Wed, 25 Jun 2025 16:54:46 -0700
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
 =?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.4
---
 llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp b/llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp
index 10e908ef73ce5..1733d9f8dd77e 100644
--- a/llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp
+++ b/llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp
@@ -159,7 +159,9 @@ PreservedAnalyses LowerAllowCheckPass::run(Function &F,
       AM.getResult<OptimizationRemarkEmitterAnalysis>(F);
 
   return removeUbsanTraps(F, BFI, PSI, ORE, Opts.cutoffs)
-             ? PreservedAnalyses::none()
+             // We do not change the CFG, we only replace the intrinsics with
+             // true or false.
+             ? PreservedAnalyses::none().preserveSet<CFGAnalyses>()
              : PreservedAnalyses::all();
 }
 
    
    
More information about the llvm-commits
mailing list