summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-07-03 16:34:08 +0000
committerPhilip Reames <listmail@philipreames.com>2019-07-03 16:34:08 +0000
commit39e7a97ad73a64ca8d63309d7037d868d8b1b0a0 (patch)
treea4fe82cc458653a2ba258f9f1882e2bf974087ba /llvm/lib/Analysis/ScalarEvolution.cpp
parentf50a953ea77623fd286ef238f9bb49f56ad46fee (diff)
downloadbcm5719-llvm-39e7a97ad73a64ca8d63309d7037d868d8b1b0a0.tar.gz
bcm5719-llvm-39e7a97ad73a64ca8d63309d7037d868d8b1b0a0.zip
[SCEV] Preserve flags on add/muls in getSCEVATScope
We haven't changed the set of users, just specialized an operand for those users. Given that, the previous wrap flags must still be correct. Sorry for the lack of test case. Noticed this while working on something else, and haven't figured out to exercise this standalone. llvm-svn: 365053
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index a66e609e4ee..4a98fc537a5 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -8243,9 +8243,9 @@ const SCEV *ScalarEvolution::computeSCEVAtScope(const SCEV *V, const Loop *L) {
NewOps.push_back(OpAtScope);
}
if (isa<SCEVAddExpr>(Comm))
- return getAddExpr(NewOps);
+ return getAddExpr(NewOps, Comm->getNoWrapFlags());
if (isa<SCEVMulExpr>(Comm))
- return getMulExpr(NewOps);
+ return getMulExpr(NewOps, Comm->getNoWrapFlags());
if (isa<SCEVMinMaxExpr>(Comm))
return getMinMaxExpr(Comm->getSCEVType(), NewOps);
llvm_unreachable("Unknown commutative SCEV type!");
OpenPOWER on IntegriCloud