forked from OSchip/llvm-project
SCEV: Actually set overflow flags on add expressions.
setFlags doesn't modify its arguments. llvm-svn: 145007
This commit is contained in:
parent
20df3953d3
commit
b5ba2eef2d
|
@ -3601,9 +3601,9 @@ const SCEV *ScalarEvolution::createSCEV(Value *V) {
|
|||
SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap;
|
||||
OverflowingBinaryOperator *OBO = cast<OverflowingBinaryOperator>(V);
|
||||
if (OBO->hasNoSignedWrap())
|
||||
setFlags(Flags, SCEV::FlagNSW);
|
||||
Flags = setFlags(Flags, SCEV::FlagNSW);
|
||||
if (OBO->hasNoUnsignedWrap())
|
||||
setFlags(Flags, SCEV::FlagNUW);
|
||||
Flags = setFlags(Flags, SCEV::FlagNUW);
|
||||
return getAddExpr(AddOps, Flags);
|
||||
}
|
||||
case Instruction::Mul: {
|
||||
|
|
Loading…
Reference in New Issue