]> granicus.if.org Git - llvm/commitdiff
[SLP] Fix buildbots, NFC.
authorAlexey Bataev <a.bataev@hotmail.com>
Sat, 9 Sep 2017 02:08:45 +0000 (02:08 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Sat, 9 Sep 2017 02:08:45 +0000 (02:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312853 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Vectorize/SLPVectorizer.cpp

index e1ad52f4387f3d08abdaf2e0529b56561859fb36..f5059671cf65a52cc082151d24bcea84129cd9e1 100644 (file)
@@ -5202,7 +5202,6 @@ private:
 
     int PairwiseRdxCost;
     int SplittingRdxCost;
-    bool IsUnsigned = true;
     switch (ReductionData.getKind()) {
     case RK_Arithmetic:
       PairwiseRdxCost =
@@ -5214,10 +5213,11 @@ private:
       break;
     case RK_Min:
     case RK_Max:
-      IsUnsigned = false;
     case RK_UMin:
     case RK_UMax: {
       Type *VecCondTy = CmpInst::makeCmpResultType(VecTy);
+      bool IsUnsigned = ReductionData.getKind() == RK_UMin ||
+                        ReductionData.getKind() == RK_UMax;
       PairwiseRdxCost =
           TTI->getMinMaxReductionCost(VecTy, VecCondTy,
                                       /*IsPairwiseForm=*/true, IsUnsigned);