forked from OSchip/llvm-project
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. llvm-svn: 279082
This commit is contained in:
parent
33e19fe1c4
commit
615b820af6
|
@ -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;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue