From 9bbc7b4e49e26a1bfcc1ec503b5c7567258a743d Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 2 Nov 2013 14:46:27 +0000 Subject: SLPVectorizer: Remove duplicated function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193927 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Vectorize/SLPVectorizer.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lib/Transforms/Vectorize/SLPVectorizer.cpp') 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 VL) { return true; } -static bool all_equal(SmallVectorImpl &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 VL, SmallVectorImpl &Left, SmallVectorImpl &Right) { @@ -301,8 +293,8 @@ static void reorderInputsAccordingToOpcode(ArrayRef 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) && -- cgit v1.1