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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 20 09:11:08 PDT 2025


================
@@ -3490,8 +3490,8 @@ Instruction *InstCombinerImpl::visitAllocSite(Instruction &MI) {
           replaceInstUsesWith(*I, Result);
           eraseInstFromFunction(*I);
           Users[i] = nullptr; // Skip examining in the next loop.
-        }
-        if (auto *MTI = dyn_cast<MemTransferInst>(I)) {
+          continue;
+        } else if (auto *MTI = dyn_cast<MemTransferInst>(I)) {
----------------
nikic wrote:

Please add the continue or the else, not both.

https://github.com/llvm/llvm-project/pull/145057


More information about the llvm-commits mailing list