llvm.org GIT mirror llvm / 96c0db1
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.) ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@296148 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 2 years ago
2 changed file(s) with 6 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
4040 STATISTIC(NumAShrs, "Number of ashr converted to lshr");
4141 STATISTIC(NumSRems, "Number of srem converted to urem");
4242
43 static cl::opt DontProcessAdds("cvp-dont-process-adds", cl::init(true));
44
4345 namespace {
4446 class CorrelatedValuePropagation : public FunctionPass {
4547 public:
403405
404406 static bool processAdd(BinaryOperator *AddOp, LazyValueInfo *LVI) {
405407 typedef OverflowingBinaryOperator OBO;
408
409 if (DontProcessAdds)
410 return false;
406411
407412 if (AddOp->getType()->isVectorTy() || hasLocalDefs(AddOp))
408413 return false;
None ; RUN: opt < %s -correlated-propagation -S | FileCheck %s
0 ; RUN: opt < %s -correlated-propagation -cvp-dont-process-adds=false -S | FileCheck %s
11
22 ; CHECK-LABEL: @test0(
33 define void @test0(i32 %a) {