summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp b/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
index ec3e734184a..674c451f640 100644
--- a/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
@@ -439,13 +439,10 @@ ArrayRef<Value *> Vectorizer::getVectorizablePrefix(ArrayRef<Value *> Chain) {
ChainInstrs.push_back({&I, InstrIdx});
} else if (I.mayHaveSideEffects()) {
DEBUG(dbgs() << "LSV: Found side-effecting operation: " << I << '\n');
- return 0;
+ break;
}
}
- assert(Chain.size() == ChainInstrs.size() &&
- "All instrs in Chain must be within range getBoundaryInstrs(Chain).");
-
// Loop until we find an instruction in ChainInstrs that we can't vectorize.
unsigned ChainInstrIdx, ChainInstrsLen;
for (ChainInstrIdx = 0, ChainInstrsLen = ChainInstrs.size();
@@ -479,7 +476,6 @@ ArrayRef<Value *> Vectorizer::getVectorizablePrefix(ArrayRef<Value *> Chain) {
DEBUG({
Value *Ptr0 = getPointerOperand(M0);
Value *Ptr1 = getPointerOperand(M1);
-
dbgs() << "LSV: Found alias:\n"
" Aliasing instruction and pointer:\n"
<< " " << *MemInstr << '\n'
@@ -713,7 +709,7 @@ bool Vectorizer::vectorizeStoreChain(
ArrayRef<Value *> NewChain = getVectorizablePrefix(Chain);
if (NewChain.empty()) {
- // There exists a side effect instruction, no vectorization possible.
+ // No vectorization possible.
InstructionsProcessed->insert(Chain.begin(), Chain.end());
return false;
}
@@ -867,7 +863,7 @@ bool Vectorizer::vectorizeLoadChain(
ArrayRef<Value *> NewChain = getVectorizablePrefix(Chain);
if (NewChain.empty()) {
- // There exists a side effect instruction, no vectorization possible.
+ // No vectorization possible.
InstructionsProcessed->insert(Chain.begin(), Chain.end());
return false;
}
OpenPOWER on IntegriCloud