diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-03-23 16:56:23 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-03-23 16:56:23 +0000 |
commit | 1466e5c383606570557db2ffd5f3b3a9eb81e52f (patch) | |
tree | f748562ff2df9e19d407947d62b937e59a830958 /llvm/lib/Transforms/Vectorize | |
parent | 64feec7977f898d6b17ee2bcfa338cb87ae45bb7 (diff) | |
download | bcm5719-llvm-1466e5c383606570557db2ffd5f3b3a9eb81e52f.tar.gz bcm5719-llvm-1466e5c383606570557db2ffd5f3b3a9eb81e52f.zip |
Fix unused variable warning on non-asserts builds. NFCI.
llvm-svn: 356841
Diffstat (limited to 'llvm/lib/Transforms/Vectorize')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 3d4d2a33241..5d3290cdc20 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -2917,8 +2917,6 @@ void BoUpSLP::reorderInputsAccordingToOpcode(const InstructionsState &S, ArrayRef<Value *> VL, SmallVectorImpl<Value *> &Left, SmallVectorImpl<Value *> &Right) { - unsigned Opcode = S.getOpcode(); - if (!VL.empty()) { // Peel the first iteration out of the loop since there's nothing // interesting to do anyway and it simplifies the checks in the loop. @@ -2941,8 +2939,9 @@ void BoUpSLP::reorderInputsAccordingToOpcode(const InstructionsState &S, for (unsigned i = 1, e = VL.size(); i != e; ++i) { Instruction *I = cast<Instruction>(VL[i]); - assert(((I->getOpcode() == Opcode && I->isCommutative()) || - (I->getOpcode() != Opcode && Instruction::isCommutative(Opcode))) && + assert(((I->getOpcode() == S.getOpcode() && I->isCommutative()) || + (I->getOpcode() != S.getOpcode() && + Instruction::isCommutative(S.getOpcode()))) && "Can only process commutative instruction"); // Commute to favor either a splat or maximizing having the same opcodes on // one side. |