[llvm] 940ff11 - [InstCombine] fix hwasan mistake in "remove dead loads" (#145057)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 20 09:23:02 PDT 2025


Author: Jameson Nash
Date: 2025-06-20T12:22:59-04:00
New Revision: 940ff110d78ba1eea7e0004275e098024cfd87c4

URL: https://github.com/llvm/llvm-project/commit/940ff110d78ba1eea7e0004275e098024cfd87c4
DIFF: https://github.com/llvm/llvm-project/commit/940ff110d78ba1eea7e0004275e098024cfd87c4.diff

LOG: [InstCombine] fix hwasan mistake in "remove dead loads" (#145057)

Detected by CI after #143958.

Added: 
    

Modified: 
    llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index bcc73090277aa..ce42029261359 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -3490,6 +3490,7 @@ Instruction *InstCombinerImpl::visitAllocSite(Instruction &MI) {
           replaceInstUsesWith(*I, Result);
           eraseInstFromFunction(*I);
           Users[i] = nullptr; // Skip examining in the next loop.
+          continue;
         }
         if (auto *MTI = dyn_cast<MemTransferInst>(I)) {
           if (KnowInitZero && isRefSet(*Removable)) {


        


More information about the llvm-commits mailing list