[llvm] r193927 - SLPVectorizer: Remove duplicated function.
Benjamin Kramer
benny.kra at googlemail.com
Sat Nov 2 07:46:27 PDT 2013
Author: d0k
Date: Sat Nov 2 09:46:27 2013
New Revision: 193927
URL: http://llvm.org/viewvc/llvm-project?rev=193927&view=rev
Log:
SLPVectorizer: Remove duplicated function.
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=193927&r1=193926&r2=193927&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Sat Nov 2 09:46:27 2013
@@ -206,14 +206,6 @@ static bool CanReuseExtract(ArrayRef<Val
return true;
}
-static bool all_equal(SmallVectorImpl<Value *> &V) {
- Value *First = V[0];
- for (int i = 1, e = V.size(); i != e; ++i)
- if (V[i] != First)
- return false;
- return true;
-}
-
static void reorderInputsAccordingToOpcode(ArrayRef<Value *> VL,
SmallVectorImpl<Value *> &Left,
SmallVectorImpl<Value *> &Right) {
@@ -301,8 +293,8 @@ static void reorderInputsAccordingToOpco
Right.push_back(V1);
}
- bool LeftBroadcast = all_equal(Left);
- bool RightBroadcast = all_equal(Right);
+ bool LeftBroadcast = isSplat(Left);
+ bool RightBroadcast = isSplat(Right);
// Don't reorder if the operands where good to begin with.
if (!(LeftBroadcast || RightBroadcast) &&
More information about the llvm-commits
mailing list