[llvm] r356841 - Fix unused variable warning on non-asserts builds. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 23 09:56:23 PDT 2019
Author: rksimon
Date: Sat Mar 23 09:56:23 2019
New Revision: 356841
URL: http://llvm.org/viewvc/llvm-project?rev=356841&view=rev
Log:
Fix unused variable warning on non-asserts builds. 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=356841&r1=356840&r2=356841&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Sat Mar 23 09:56:23 2019
@@ -2917,8 +2917,6 @@ void BoUpSLP::reorderInputsAccordingToOp
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::reorderInputsAccordingToOp
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.
More information about the llvm-commits
mailing list