Skip to content

Commit a243887

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

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

0 commit comments

Comments
 (0)