Skip to content

Commit 93e0e47

Browse files
Remove redundant checks.
1 parent 8fa00f0 commit 93e0e47

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

llvm/lib/Transforms/Utils/SSAUpdater.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,6 @@ void LoadAndStorePromoter::run(const SmallVectorImpl<Instruction *> &Insts) {
453453
Value *StoredValue = nullptr;
454454
for (Instruction *I : BlockUses) {
455455
if (LoadInst *L = dyn_cast<LoadInst>(I)) {
456-
// If this is a load from an unrelated pointer, ignore it.
457-
if (!isInstInList(L, Insts))
458-
continue;
459-
460456
// If we haven't seen a store yet, this is a live in use, otherwise
461457
// use the stored value.
462458
if (StoredValue) {
@@ -470,18 +466,13 @@ void LoadAndStorePromoter::run(const SmallVectorImpl<Instruction *> &Insts) {
470466
}
471467

472468
if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
473-
// If this is a store to an unrelated pointer, ignore it.
474-
if (!isInstInList(SI, Insts))
475-
continue;
476469
updateDebugInfo(SI);
477470

478471
// Remember that this is the active value in the block.
479472
StoredValue = SI->getOperand(0);
480473
} else if (auto *AI = dyn_cast<AllocaInst>(I)) {
481474
// Check if this an alloca, in which case we treat it as a store of
482475
// getValueToUseForAlloca.
483-
if (!isInstInList(AI, Insts))
484-
continue;
485476
StoredValue = getValueToUseForAlloca(AI);
486477
}
487478
}

0 commit comments

Comments
 (0)