mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
SCEV: Actually set overflow flags on add expressions.
setFlags doesn't modify its arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2901243fda
commit
13c3c75176
@ -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
Block a user