[llvm] r251087 - SLPVectorizer: AllSameOpcode* starts "true" only for instructions
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 22 18:04:45 PDT 2015
Author: mehdi_amini
Date: Thu Oct 22 20:04:45 2015
New Revision: 251087
URL: http://llvm.org/viewvc/llvm-project?rev=251087&view=rev
Log:
SLPVectorizer: AllSameOpcode* starts "true" only for instructions
r251085 wasn't as NFC as intended...
From: Mehdi Amini <mehdi.amini at apple.com>
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=251087&r1=251086&r2=251087&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Thu Oct 22 20:04:45 2015
@@ -2002,9 +2002,6 @@ void BoUpSLP::reorderInputsAccordingToOp
SmallVector<Value *, 16> OrigLeft, OrigRight;
- bool AllSameOpcodeLeft = true;
- bool AllSameOpcodeRight = true;
-
if (VL.size()) {
// Peel the first iteration out of the loop since there's nothing
// interesting to do anyway and it simplifies the checks
@@ -2019,6 +2016,10 @@ void BoUpSLP::reorderInputsAccordingToOp
Right.push_back(VRight);
}
+ // Keep track if we have instructions with all the same opcode on one side.
+ bool AllSameOpcodeLeft = isa<Instruction>(Left[0]);
+ bool AllSameOpcodeRight = isa<Instruction>(Right[0]);
+
for (unsigned i = 1, e = VL.size(); i != e; ++i) {
Instruction *I = cast<Instruction>(VL[i]);
More information about the llvm-commits
mailing list