1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

[SLPVectorizer] Prefer pre-increments. NFCI.

llvm-svn: 359989
This commit is contained in:
Simon Pilgrim 2019-05-05 17:53:09 +00:00
parent c83a12b06e
commit 32679e4775

View File

@ -4350,7 +4350,7 @@ bool BoUpSLP::BlockScheduling::extendSchedulingRegion(Value *V,
<< "\n");
return true;
}
UpIter++;
++UpIter;
}
if (DownIter != LowerEnd) {
if (&*DownIter == I) {
@ -4364,7 +4364,7 @@ bool BoUpSLP::BlockScheduling::extendSchedulingRegion(Value *V,
<< "\n");
return true;
}
DownIter++;
++DownIter;
}
assert((UpIter != UpperEnd || DownIter != LowerEnd) &&
"instruction not found in block");
@ -6650,7 +6650,7 @@ bool SLPVectorizerPass::vectorizeChainsInBlock(BasicBlock *BB, BoUpSLP &R) {
SmallVector<WeakVH, 8> PostProcessInstructions;
SmallDenseSet<Instruction *, 4> KeyNodes;
for (BasicBlock::iterator it = BB->begin(), e = BB->end(); it != e; it++) {
for (BasicBlock::iterator it = BB->begin(), e = BB->end(); it != e; ++it) {
// We may go through BB multiple times so skip the one we have checked.
if (!VisitedInstrs.insert(&*it).second) {
if (it->use_empty() && KeyNodes.count(&*it) > 0 &&