[llvm-commits] [llvm] r145007 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sun Nov 20 02:24:36 PST 2011
Author: d0k
Date: Sun Nov 20 04:24:36 2011
New Revision: 145007
URL: http://llvm.org/viewvc/llvm-project?rev=145007&view=rev
Log:
SCEV: Actually set overflow flags on add expressions.
setFlags doesn't modify its arguments.
Modified:
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=145007&r1=145006&r2=145007&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Sun Nov 20 04:24:36 2011
@@ -3601,9 +3601,9 @@
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: {
More information about the llvm-commits
mailing list