[llvm] r336063 - [SLPVectorizer] Use InstructionsState Op/Alt opcodes directly. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 1 06:41:58 PDT 2018
Author: rksimon
Date: Sun Jul 1 06:41:58 2018
New Revision: 336063
URL: http://llvm.org/viewvc/llvm-project?rev=336063&view=rev
Log:
[SLPVectorizer] Use InstructionsState Op/Alt opcodes directly. NFCI.
Modified:
llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=336063&r1=336062&r2=336063&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Sun Jul 1 06:41:58 2018
@@ -2837,10 +2837,8 @@ void BoUpSLP::setInsertPointAfterBundle(
// should be in this block.
auto *Front = cast<Instruction>(S.OpValue);
auto *BB = Front->getParent();
- const unsigned Opcode = S.Opcode;
- const unsigned AltOpcode = S.AltOpcode;
assert(llvm::all_of(make_range(VL.begin(), VL.end()), [=](Value *V) -> bool {
- return !sameOpcodeOrAlt(Opcode, AltOpcode,
+ return !sameOpcodeOrAlt(S.Opcode, S.AltOpcode,
cast<Instruction>(V)->getOpcode()) ||
cast<Instruction>(V)->getParent() == BB;
}));
@@ -2882,7 +2880,7 @@ void BoUpSLP::setInsertPointAfterBundle(
if (!LastInst) {
SmallPtrSet<Value *, 16> Bundle(VL.begin(), VL.end());
for (auto &I : make_range(BasicBlock::iterator(Front), BB->end())) {
- if (Bundle.erase(&I) && sameOpcodeOrAlt(Opcode, AltOpcode, I.getOpcode()))
+ if (Bundle.erase(&I) && sameOpcodeOrAlt(S.Opcode, S.AltOpcode, I.getOpcode()))
LastInst = &I;
if (Bundle.empty())
break;
More information about the llvm-commits
mailing list