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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365053
91177308-0d34-0410-b5e6-
96231b3b80d8
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!");