forked from OSchip/llvm-project
[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
This commit is contained in:
parent
f50a953ea7
commit
39e7a97ad7
|
@ -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!");
|
||||
|
|
Loading…
Reference in New Issue