CVP. Turn marking adds as no wrap (introduced by r278107) off by default

It causes a regression on our internal benchmark. Introduce cvp-dont-process flag and set it off by default while investigating the regression.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279082 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Artur Pilipenko 2016-08-18 16:08:35 +00:00
parent 2afbd4c045
commit 2e26f159da
2 changed files with 6 additions and 1 deletions

View File

@ -40,6 +40,8 @@ STATISTIC(NumDeadCases, "Number of switch cases removed");
STATISTIC(NumSDivs, "Number of sdiv converted to udiv");
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:
@ -385,6 +387,9 @@ static bool processSDiv(BinaryOperator *SDI, LazyValueInfo *LVI) {
static bool processAdd(BinaryOperator *AddOp, LazyValueInfo *LVI) {
typedef OverflowingBinaryOperator OBO;
if (DontProcessAdds)
return false;
if (AddOp->getType()->isVectorTy() || hasLocalDefs(AddOp))
return false;

View File

@ -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) {