diff options
author | Philip Reames <listmail@philipreames.com> | 2019-07-03 16:34:08 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2019-07-03 16:34:08 +0000 |
commit | 39e7a97ad73a64ca8d63309d7037d868d8b1b0a0 (patch) | |
tree | a4fe82cc458653a2ba258f9f1882e2bf974087ba /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | f50a953ea77623fd286ef238f9bb49f56ad46fee (diff) | |
download | bcm5719-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.cpp | 4 |
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!"); |