[CVP] Remove -cvp-dont-add-nowrap-flags option
authorNikita Popov <nikita.ppv@gmail.com>
Sun, 7 Mar 2021 17:19:31 +0000 (18:19 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Sun, 7 Mar 2021 17:19:31 +0000 (18:19 +0100)
This option was originally added to work around a bug in LFTR.
The bug has long since been fixed.

llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
llvm/test/Transforms/CorrelatedValuePropagation/add.ll
llvm/test/Transforms/CorrelatedValuePropagation/mul.ll
llvm/test/Transforms/CorrelatedValuePropagation/shl.ll
llvm/test/Transforms/CorrelatedValuePropagation/sub.ll

index b671d68..02d2bac 100644 (file)
@@ -86,8 +86,6 @@ STATISTIC(NumOverflows, "Number of overflow checks removed");
 STATISTIC(NumSaturating,
     "Number of saturating arithmetics converted to normal arithmetics");
 
-static cl::opt<bool> DontAddNoWrapFlags("cvp-dont-add-nowrap-flags", cl::init(false));
-
 namespace {
 
   class CorrelatedValuePropagation : public FunctionPass {
@@ -843,9 +841,6 @@ static bool processSExt(SExtInst *SDI, LazyValueInfo *LVI) {
 static bool processBinOp(BinaryOperator *BinOp, LazyValueInfo *LVI) {
   using OBO = OverflowingBinaryOperator;
 
-  if (DontAddNoWrapFlags)
-    return false;
-
   if (BinOp->getType()->isVectorTy())
     return false;
 
index 026af75..e58a7e2 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -correlated-propagation -cvp-dont-add-nowrap-flags=false -S | FileCheck %s
+; RUN: opt < %s -correlated-propagation -S | FileCheck %s
 
 ; CHECK-LABEL: @test0(
 define void @test0(i32 %a) {
index 288d114..b3b579b 100644 (file)
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -correlated-propagation -cvp-dont-add-nowrap-flags=false -S | FileCheck %s
+; RUN: opt < %s -correlated-propagation -S | FileCheck %s
 
 define i8 @test0(i8 %a) {
 ; CHECK-LABEL: @test0(
index 0514ec9..17e65cd 100644 (file)
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -correlated-propagation -cvp-dont-add-nowrap-flags=false -S | FileCheck %s
+; RUN: opt < %s -correlated-propagation -S | FileCheck %s
 
 define i8 @test0(i8 %a, i8 %b) {
 ; CHECK-LABEL: @test0(
index 091059c..696665f 100644 (file)
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -correlated-propagation -cvp-dont-add-nowrap-flags=false -S | FileCheck %s
+; RUN: opt < %s -correlated-propagation -S | FileCheck %s
 
 define void @test0(i32 %a) {
 ; CHECK-LABEL: @test0(