From 2b494f85f10ab79f41e74c8e75d707825f8cc110 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 7 Mar 2021 18:19:31 +0100 Subject: [PATCH] [CVP] Remove -cvp-dont-add-nowrap-flags option 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 | 5 ----- llvm/test/Transforms/CorrelatedValuePropagation/add.ll | 2 +- llvm/test/Transforms/CorrelatedValuePropagation/mul.ll | 2 +- llvm/test/Transforms/CorrelatedValuePropagation/shl.ll | 2 +- llvm/test/Transforms/CorrelatedValuePropagation/sub.ll | 2 +- 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp b/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp index b671d68..02d2bac 100644 --- a/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp +++ b/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp @@ -86,8 +86,6 @@ STATISTIC(NumOverflows, "Number of overflow checks removed"); STATISTIC(NumSaturating, "Number of saturating arithmetics converted to normal arithmetics"); -static cl::opt 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; diff --git a/llvm/test/Transforms/CorrelatedValuePropagation/add.ll b/llvm/test/Transforms/CorrelatedValuePropagation/add.ll index 026af75..e58a7e2 100644 --- a/llvm/test/Transforms/CorrelatedValuePropagation/add.ll +++ b/llvm/test/Transforms/CorrelatedValuePropagation/add.ll @@ -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) { diff --git a/llvm/test/Transforms/CorrelatedValuePropagation/mul.ll b/llvm/test/Transforms/CorrelatedValuePropagation/mul.ll index 288d114..b3b579b 100644 --- a/llvm/test/Transforms/CorrelatedValuePropagation/mul.ll +++ b/llvm/test/Transforms/CorrelatedValuePropagation/mul.ll @@ -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( diff --git a/llvm/test/Transforms/CorrelatedValuePropagation/shl.ll b/llvm/test/Transforms/CorrelatedValuePropagation/shl.ll index 0514ec9..17e65cd 100644 --- a/llvm/test/Transforms/CorrelatedValuePropagation/shl.ll +++ b/llvm/test/Transforms/CorrelatedValuePropagation/shl.ll @@ -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( diff --git a/llvm/test/Transforms/CorrelatedValuePropagation/sub.ll b/llvm/test/Transforms/CorrelatedValuePropagation/sub.ll index 091059c..696665f 100644 --- a/llvm/test/Transforms/CorrelatedValuePropagation/sub.ll +++ b/llvm/test/Transforms/CorrelatedValuePropagation/sub.ll @@ -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( -- 2.7.4