diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-11-20 10:24:36 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-11-20 10:24:36 +0000 |
commit | 13c3c7517620a6fbff2c355b582755b73f41b87e (patch) | |
tree | 9f509f1033292d6f8be4c7176715e62380384098 /lib | |
parent | 2901243fda3fa68f55f52700d473642e719aa219 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 77defa82e7..622b214aed 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -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: { |