1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

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:
Artur Pilipenko 2016-08-18 16:08:35 +00:00
parent 83214d792d
commit fb8322f0dc
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(NumSDivs, "Number of sdiv converted to udiv");
STATISTIC(NumSRems, "Number of srem converted to urem"); STATISTIC(NumSRems, "Number of srem converted to urem");
static cl::opt<bool> DontProcessAdds("cvp-dont-process-adds", cl::init(true));
namespace { namespace {
class CorrelatedValuePropagation : public FunctionPass { class CorrelatedValuePropagation : public FunctionPass {
public: public:
@ -385,6 +387,9 @@ static bool processSDiv(BinaryOperator *SDI, LazyValueInfo *LVI) {
static bool processAdd(BinaryOperator *AddOp, LazyValueInfo *LVI) { static bool processAdd(BinaryOperator *AddOp, LazyValueInfo *LVI) {
typedef OverflowingBinaryOperator OBO; typedef OverflowingBinaryOperator OBO;
if (DontProcessAdds)
return false;
if (AddOp->getType()->isVectorTy() || hasLocalDefs(AddOp)) if (AddOp->getType()->isVectorTy() || hasLocalDefs(AddOp))
return false; 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( ; CHECK-LABEL: @test0(
define void @test0(i32 %a) { define void @test0(i32 %a) {