]> granicus.if.org Git - llvm/commitdiff
Revert 303174, 303176, and 303178
authorMatthew Simpson <mssimpso@codeaurora.org>
Tue, 16 May 2017 15:50:30 +0000 (15:50 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Tue, 16 May 2017 15:50:30 +0000 (15:50 +0000)
These commits are breaking the bots. Reverting to investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303182 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/AArch64/interleave_count.ll [deleted file]

index f18ff8f991f1cc356137576c93e8b8e25410ab37..516ab7d03a88eddfdfb7a3ea26f50fc61de35773 100644 (file)
@@ -6550,8 +6550,8 @@ unsigned LoopVectorizationCostModel::selectInterleaveCount(bool OptForSize,
     // We assume that the cost overhead is 1 and we use the cost model
     // to estimate the cost of the loop and interleave until the cost of the
     // loop overhead is about 5% of the cost of the loop.
-    unsigned SmallIC = std::min(
-        IC, (unsigned)PowerOf2Floor(SmallLoopCost / LoopCost ? LoopCost : 1));
+    unsigned SmallIC =
+        std::min(IC, (unsigned)PowerOf2Floor(SmallLoopCost / LoopCost));
 
     // Interleave until store/load ports (estimated by max interleave count) are
     // saturated.
diff --git a/test/Transforms/LoopVectorize/AArch64/interleave_count.ll b/test/Transforms/LoopVectorize/AArch64/interleave_count.ll
deleted file mode 100644 (file)
index 275beb6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-; REQUIRES: asserts
-; RUN: opt < %s -loop-vectorize -force-target-instruction-cost=0 -force-vector-width=2 -force-vector-interleave=1 -instcombine -S | FileCheck %s
-
-target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
-target triple = "aarch64--linux-gnu"
-
-; CHECK-LABEL: @copy(
-; CHECK:       vector.body:
-; CHECK-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, %vector.ph ], [ [[INDEX_NEXT:%.*]], %vector.body ]
-; CHECK-NEXT:    [[TMP2:%.*]] = getelementptr inbounds i64, i64* %a, i64 [[INDEX]]
-; CHECK-NEXT:    [[TMP3:%.*]] = getelementptr inbounds i64, i64* %b, i64 [[INDEX]]
-; CHECK-NEXT:    [[TMP4:%.*]] = bitcast i64* [[TMP3]] to <2 x i64>*
-; CHECK-NEXT:    [[WIDE_LOAD:%.*]] = load <2 x i64>, <2 x i64>* [[TMP4]], align 8
-; CHECK-NEXT:    [[TMP5:%.*]] = bitcast i64* [[TMP2]] to <2 x i64>*
-; CHECK-NEXT:    store <2 x i64> [[WIDE_LOAD]], <2 x i64>* [[TMP5]], align 8
-; CHECK-NEXT:    [[INDEX_NEXT]] = add i64 [[INDEX]], 2
-; CHECK:         br i1 {{.*}}, label %middle.block, label %vector.body
-;
-define void @copy(i64* %a, i64* %b, i64 %n) {
-entry:
-  br label %for.body
-
-for.body:
-  %i = phi i64 [ %i.next, %for.body ], [ 0, %entry ]
-  %tmp0 = getelementptr inbounds i64, i64* %a, i64 %i
-  %tmp1 = getelementptr inbounds i64, i64* %b, i64 %i
-  %tmp3 = load i64, i64* %tmp1, align 8
-  store i64 %tmp3, i64* %tmp0, align 8
-  %i.next = add nuw nsw i64 %i, 1
-  %cond = icmp slt i64 %i.next, %n
-  br i1 %cond, label %for.body, label %for.end
-
-for.end:
-  ret void
-}