aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Vectorize
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-11-02 14:46:27 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-11-02 14:46:27 +0000
commit9bbc7b4e49e26a1bfcc1ec503b5c7567258a743d (patch)
tree051a78a140817133c66209406c911ac6c76e72dd /lib/Transforms/Vectorize
parentff566d8f4492d7f32814656eaeca75635526d2db (diff)
downloadexternal_llvm-9bbc7b4e49e26a1bfcc1ec503b5c7567258a743d.zip
external_llvm-9bbc7b4e49e26a1bfcc1ec503b5c7567258a743d.tar.gz
external_llvm-9bbc7b4e49e26a1bfcc1ec503b5c7567258a743d.tar.bz2
SLPVectorizer: Remove duplicated function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize')
-rw-r--r--lib/Transforms/Vectorize/SLPVectorizer.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 2797a21..9a21653 100644
--- a/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -206,14 +206,6 @@ static bool CanReuseExtract(ArrayRef<Value *> VL) {
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 reorderInputsAccordingToOpcode(ArrayRef<Value *> VL,
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) &&