From 13c3c7517620a6fbff2c355b582755b73f41b87e Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 20 Nov 2011 10:24:36 +0000 Subject: 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 --- lib/Analysis/ScalarEvolution.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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(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: { -- cgit v1.2.3-18-g5258