Skip to content

Commit

Permalink
[LV] Fix typo in variable name. NFC.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjoerd Meijer committed May 7, 2020
1 parent 0d22076 commit 3bbc71d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
Expand Up @@ -983,14 +983,14 @@ bool LoopVectorizationLegality::canVectorizeWithIfConvert() {
// the memory pointed to can be dereferenced (with the access size implied by
// the value's type) unconditionally within the loop header without
// introducing a new fault.
SmallPtrSet<Value *, 8> SafePointes;
SmallPtrSet<Value *, 8> SafePointers;

// Collect safe addresses.
for (BasicBlock *BB : TheLoop->blocks()) {
if (!blockNeedsPredication(BB)) {
for (Instruction &I : *BB)
if (auto *Ptr = getLoadStorePointerOperand(&I))
SafePointes.insert(Ptr);
SafePointers.insert(Ptr);
continue;
}

Expand All @@ -1004,7 +1004,7 @@ bool LoopVectorizationLegality::canVectorizeWithIfConvert() {
LoadInst *LI = dyn_cast<LoadInst>(&I);
if (LI && !mustSuppressSpeculation(*LI) &&
isDereferenceableAndAlignedInLoop(LI, TheLoop, SE, *DT))
SafePointes.insert(LI->getPointerOperand());
SafePointers.insert(LI->getPointerOperand());
}
}

Expand All @@ -1022,7 +1022,7 @@ bool LoopVectorizationLegality::canVectorizeWithIfConvert() {

// We must be able to predicate all blocks that need to be predicated.
if (blockNeedsPredication(BB)) {
if (!blockCanBePredicated(BB, SafePointes)) {
if (!blockCanBePredicated(BB, SafePointers)) {
reportVectorizationFailure(
"Control flow cannot be substituted for a select",
"control flow cannot be substituted for a select",
Expand Down

0 comments on commit 3bbc71d

Please sign in to comment.