[llvm] r323580 - Revert "[SLP] Removed the warning about unused variable, NFC."
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 26 18:42:18 PST 2018
Author: abataev
Date: Fri Jan 26 18:42:17 2018
New Revision: 323580
URL: http://llvm.org/viewvc/llvm-project?rev=323580&view=rev
Log:
Revert "[SLP] Removed the warning about unused variable, NFC."
This reverts commit r323533 to fix possible problems in users code.
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=323580&r1=323579&r2=323580&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Fri Jan 26 18:42:17 2018
@@ -2853,7 +2853,7 @@ Value *BoUpSLP::vectorizeTree(ArrayRef<V
if (VL.size() == E->Scalars.size() && !E->ReuseShuffleIndices.empty()) {
// We need to get the vectorized value but without shuffle.
if (auto *SV = dyn_cast<ShuffleVectorInst>(V)) {
- V = SV->getOperand(0);
+ V = cast<ShuffleVectorInst>(V)->getOperand(0);
} else {
// Reshuffle to get only unique values.
SmallVector<unsigned, 4> UniqueIdxs;
More information about the llvm-commits
mailing list