diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-11-02 14:46:27 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-11-02 14:46:27 +0000 |
commit | 089c1e4f6da4af94866cebf69d0b2a6f11938219 (patch) | |
tree | b1bc6bcb3345615335ce16d8b5bce89803564e46 /llvm/lib | |
parent | 568a1cd9df7ff019e07053fc77cc6052e88e5708 (diff) | |
download | bcm5719-llvm-089c1e4f6da4af94866cebf69d0b2a6f11938219.tar.gz bcm5719-llvm-089c1e4f6da4af94866cebf69d0b2a6f11938219.zip |
SLPVectorizer: Remove duplicated function.
llvm-svn: 193927
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 2797a214212..9a2165329d9 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/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) && |