summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorSam Parker <sam.parker@arm.com>2019-06-14 09:19:41 +0000
committerSam Parker <sam.parker@arm.com>2019-06-14 09:19:41 +0000
commit0cf9639a9c3e45582d112d17e3b23b9a79e9b49e (patch)
tree4a691bb3bf2d339d5e17afd7cc389395984f5ab6 /llvm/lib/Analysis
parent411c630bae0e0d50697651797709987e2cfea92d (diff)
downloadbcm5719-llvm-0cf9639a9c3e45582d112d17e3b23b9a79e9b49e.tar.gz
bcm5719-llvm-0cf9639a9c3e45582d112d17e3b23b9a79e9b49e.zip
[SCEV] Pass NoWrapFlags when expanding an AddExpr
InsertBinop now accepts NoWrapFlags, so pass them through when expanding a simple add expression. This is the first re-commit of the functional changes from rL362687, which was previously reverted. Differential Revision: https://reviews.llvm.org/D61934 llvm-svn: 363364
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/ScalarEvolutionExpander.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
index ea936f57164..c7f51be88d5 100644
--- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
+++ b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
@@ -753,7 +753,7 @@ Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) {
Sum = InsertNoopCastOfTo(Sum, Ty);
// Canonicalize a constant to the RHS.
if (isa<Constant>(Sum)) std::swap(Sum, W);
- Sum = InsertBinop(Instruction::Add, Sum, W, SCEV::FlagAnyWrap,
+ Sum = InsertBinop(Instruction::Add, Sum, W, S->getNoWrapFlags(),
/*IsSafeToHoist*/ true);
++I;
}
OpenPOWER on IntegriCloud