[llvm-branch-commits] [llvm-branch] r296148 - Merging r296030:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Feb 24 10:37:22 PST 2017


Author: hans
Date: Fri Feb 24 12:37:22 2017
New Revision: 296148

URL: http://llvm.org/viewvc/llvm-project?rev=296148&view=rev
Log:
Merging r296030:
------------------------------------------------------------------------
r296030 | hans | 2017-02-23 14:29:00 -0800 (Thu, 23 Feb 2017) | 7 lines

Revert r282872 "CVP. Turn marking adds as no wrap on by default"

While not CVP's fault, this caused miscompiles (PR31181). Reverting
until those are resolved.

(This also reverts the follow-ups r288154 and r288161 which removed the
flag.)
------------------------------------------------------------------------

Modified:
    llvm/branches/release_40/   (props changed)
    llvm/branches/release_40/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
    llvm/branches/release_40/test/Transforms/CorrelatedValuePropagation/add.ll

Propchange: llvm/branches/release_40/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb 24 12:37:22 2017
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,291858-291859,291863,291875,291909,291918,291966,291968,291979,292117,292133,292167,292169-292170,292242,292254-292255,292280,292323,292444,292467,292516,292583,292624-292625,292641,292651,292667,292711-292713,292758,292949,293017,293021,293025,293124,293230,293259,293273,293291,293293,293309,293345,293417,293522,293542,293629,293635,293658,293673,293727,293730,294003,294102,294129,294203,294267,294318,294348-294349,294357,294527,294551,294982,295018,295213,295215,295230,295486,295490,295512,295762
+/llvm/trunk:155241,291858-291859,291863,291875,291909,291918,291966,291968,291979,292117,292133,292167,292169-292170,292242,292254-292255,292280,292323,292444,292467,292516,292583,292624-292625,292641,292651,292667,292711-292713,292758,292949,293017,293021,293025,293124,293230,293259,293273,293291,293293,293309,293345,293417,293522,293542,293629,293635,293658,293673,293727,293730,294003,294102,294129,294203,294267,294318,294348-294349,294357,294527,294551,294982,295018,295213,295215,295230,295486,295490,295512,295762,296030

Modified: llvm/branches/release_40/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_40/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp?rev=296148&r1=296147&r2=296148&view=diff
==============================================================================
--- llvm/branches/release_40/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp (original)
+++ llvm/branches/release_40/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp Fri Feb 24 12:37:22 2017
@@ -41,6 +41,8 @@ STATISTIC(NumSDivs,     "Number of sdiv
 STATISTIC(NumAShrs,     "Number of ashr converted to lshr");
 STATISTIC(NumSRems,     "Number of srem converted to urem");
 
+static cl::opt<bool> DontProcessAdds("cvp-dont-process-adds", cl::init(true));
+
 namespace {
   class CorrelatedValuePropagation : public FunctionPass {
   public:
@@ -405,6 +407,9 @@ static bool processAShr(BinaryOperator *
 static bool processAdd(BinaryOperator *AddOp, LazyValueInfo *LVI) {
   typedef OverflowingBinaryOperator OBO;
 
+  if (DontProcessAdds)
+    return false;
+
   if (AddOp->getType()->isVectorTy() || hasLocalDefs(AddOp))
     return false;
 

Modified: llvm/branches/release_40/test/Transforms/CorrelatedValuePropagation/add.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_40/test/Transforms/CorrelatedValuePropagation/add.ll?rev=296148&r1=296147&r2=296148&view=diff
==============================================================================
--- llvm/branches/release_40/test/Transforms/CorrelatedValuePropagation/add.ll (original)
+++ llvm/branches/release_40/test/Transforms/CorrelatedValuePropagation/add.ll Fri Feb 24 12:37:22 2017
@@ -1,4 +1,4 @@
-; RUN: opt < %s -correlated-propagation -S | FileCheck %s
+; RUN: opt < %s -correlated-propagation -cvp-dont-process-adds=false -S | FileCheck %s
 
 ; CHECK-LABEL: @test0(
 define void @test0(i32 %a) {




More information about the llvm-branch-commits mailing list