Skip to content

Commit 02415d5

Browse files
committed
[InstCombine] fix hwasan mistake in "remove dead loads"
Detected by CI after #143958.
1 parent 887222e commit 02415d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3490,8 +3490,8 @@ Instruction *InstCombinerImpl::visitAllocSite(Instruction &MI) {
34903490
replaceInstUsesWith(*I, Result);
34913491
eraseInstFromFunction(*I);
34923492
Users[i] = nullptr; // Skip examining in the next loop.
3493-
}
3494-
if (auto *MTI = dyn_cast<MemTransferInst>(I)) {
3493+
continue;
3494+
} else if (auto *MTI = dyn_cast<MemTransferInst>(I)) {
34953495
if (KnowInitZero && isRefSet(*Removable)) {
34963496
IRBuilderBase::InsertPointGuard Guard(Builder);
34973497
Builder.SetInsertPoint(MTI);

0 commit comments

Comments
 (0)