[llvm-branch-commits] [llvm-branch] r325773 - Merging r325687:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 22 04:53:02 PST 2018


Author: hans
Date: Thu Feb 22 04:53:02 2018
New Revision: 325773

URL: http://llvm.org/viewvc/llvm-project?rev=325773&view=rev
Log:
Merging r325687:
------------------------------------------------------------------------
r325687 | sbaranga | 2018-02-21 16:20:32 +0100 (Wed, 21 Feb 2018) | 8 lines

[SCEV] Temporarily disable loop versioning for the purpose
of turning SCEVUnknowns of PHIs into AddRecExprs.

This feature is now hidden behind the -scev-version-unknown flag.

Fixes PR36032 and PR35432.


------------------------------------------------------------------------

Modified:
    llvm/branches/release_60/   (props changed)
    llvm/branches/release_60/lib/Analysis/ScalarEvolution.cpp
    llvm/branches/release_60/test/Transforms/LoopVectorize/pr30654-phiscev-sext-trunc.ll
    llvm/branches/release_60/test/Transforms/LoopVectorize/pr35773.ll
    llvm/branches/release_60/test/Transforms/LoopVectorize/vect-phiscev-sext-trunc.ll

Propchange: llvm/branches/release_60/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 22 04:53:02 2018
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,321751,321789,321791,321806,321862,321870,321872,321878,321911,321980,321991,321993-321994,322003,322016,322053,322056,322103,322106,322108,322123,322131,322223,322272,322313,322372,322473,322623,322644,322724,322767,322875,322878-322879,322900,322904-322905,322973,322993,323034,323155,323190,323307,323331,323355,323369,323371,323384,323469,323515,323536,323582,323643,323671-323672,323706,323710,323759,323781,323810-323811,323813,323857,323907-323909,323913,323915,324002,324039,324110,324195,324353,324422,324449,324497,324576,324645,324746,324772,324916,324962,325049,325085,325139,325148,325168,325463,325525,325550,325654,325739
+/llvm/trunk:155241,321751,321789,321791,321806,321862,321870,321872,321878,321911,321980,321991,321993-321994,322003,322016,322053,322056,322103,322106,322108,322123,322131,322223,322272,322313,322372,322473,322623,322644,322724,322767,322875,322878-322879,322900,322904-322905,322973,322993,323034,323155,323190,323307,323331,323355,323369,323371,323384,323469,323515,323536,323582,323643,323671-323672,323706,323710,323759,323781,323810-323811,323813,323857,323907-323909,323913,323915,324002,324039,324110,324195,324353,324422,324449,324497,324576,324645,324746,324772,324916,324962,325049,325085,325139,325148,325168,325463,325525,325550,325654,325687,325739

Modified: llvm/branches/release_60/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/lib/Analysis/ScalarEvolution.cpp?rev=325773&r1=325772&r2=325773&view=diff
==============================================================================
--- llvm/branches/release_60/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/branches/release_60/lib/Analysis/ScalarEvolution.cpp Thu Feb 22 04:53:02 2018
@@ -205,6 +205,11 @@ static cl::opt<unsigned>
                   cl::desc("Max coefficients in AddRec during evolving"),
                   cl::init(16));
 
+static cl::opt<bool> VersionUnknown(
+    "scev-version-unknown", cl::Hidden,
+    cl::desc("Use predicated scalar evolution to version SCEVUnknowns"),
+    cl::init(false));
+
 //===----------------------------------------------------------------------===//
 //                           SCEV class definitions
 //===----------------------------------------------------------------------===//
@@ -11467,6 +11472,8 @@ private:
   // couldn't create an AddRec for it, or couldn't add the predicate), we just
   // return \p Expr.
   const SCEV *convertToAddRecWithPreds(const SCEVUnknown *Expr) {
+    if (!VersionUnknown)
+      return Expr;
     if (!isa<PHINode>(Expr->getValue()))
       return Expr;
     Optional<std::pair<const SCEV *, SmallVector<const SCEVPredicate *, 3>>>

Modified: llvm/branches/release_60/test/Transforms/LoopVectorize/pr30654-phiscev-sext-trunc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/test/Transforms/LoopVectorize/pr30654-phiscev-sext-trunc.ll?rev=325773&r1=325772&r2=325773&view=diff
==============================================================================
--- llvm/branches/release_60/test/Transforms/LoopVectorize/pr30654-phiscev-sext-trunc.ll (original)
+++ llvm/branches/release_60/test/Transforms/LoopVectorize/pr30654-phiscev-sext-trunc.ll Thu Feb 22 04:53:02 2018
@@ -1,4 +1,4 @@
-; RUN: opt -S -loop-vectorize -force-vector-width=4 -force-vector-interleave=1 < %s 2>&1 | FileCheck %s
+; RUN: opt -S -loop-vectorize -force-vector-width=4 -force-vector-interleave=1 -scev-version-unknown < %s 2>&1 | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 

Modified: llvm/branches/release_60/test/Transforms/LoopVectorize/pr35773.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/test/Transforms/LoopVectorize/pr35773.ll?rev=325773&r1=325772&r2=325773&view=diff
==============================================================================
--- llvm/branches/release_60/test/Transforms/LoopVectorize/pr35773.ll (original)
+++ llvm/branches/release_60/test/Transforms/LoopVectorize/pr35773.ll Thu Feb 22 04:53:02 2018
@@ -1,4 +1,4 @@
-; RUN: opt -S -loop-vectorize -force-vector-width=4 -force-vector-interleave=1 < %s 2>&1 | FileCheck %s
+; RUN: opt -S -loop-vectorize -force-vector-width=4 -force-vector-interleave=1 -scev-version-unknown < %s 2>&1 | FileCheck %s
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 @a = common local_unnamed_addr global i32 0, align 4
 @b = common local_unnamed_addr global i8 0, align 1

Modified: llvm/branches/release_60/test/Transforms/LoopVectorize/vect-phiscev-sext-trunc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/test/Transforms/LoopVectorize/vect-phiscev-sext-trunc.ll?rev=325773&r1=325772&r2=325773&view=diff
==============================================================================
--- llvm/branches/release_60/test/Transforms/LoopVectorize/vect-phiscev-sext-trunc.ll (original)
+++ llvm/branches/release_60/test/Transforms/LoopVectorize/vect-phiscev-sext-trunc.ll Thu Feb 22 04:53:02 2018
@@ -1,5 +1,5 @@
-; RUN: opt -S -loop-vectorize -force-vector-width=8 -force-vector-interleave=1 < %s | FileCheck %s -check-prefix=VF8
-; RUN: opt -S -loop-vectorize -force-vector-width=1 -force-vector-interleave=4 < %s | FileCheck %s -check-prefix=VF1
+; RUN: opt -S -loop-vectorize -force-vector-width=8 -force-vector-interleave=1 -scev-version-unknown < %s | FileCheck %s -check-prefix=VF8
+; RUN: opt -S -loop-vectorize -force-vector-width=1 -force-vector-interleave=4 -scev-version-unknown < %s | FileCheck %s -check-prefix=VF1
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 




More information about the llvm-branch-commits mailing list