From: David Majnemer Date: Fri, 21 Nov 2014 02:37:38 +0000 (+0000) Subject: This Reassociate change unintentionally slipped in r222499 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=dac753cb735cef91b8a10b11d8f0cd94c4258a80;p=oota-llvm.git This Reassociate change unintentionally slipped in r222499 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222500 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp index d37eac56d51..1bbaaf34603 100644 --- a/lib/Transforms/Scalar/Reassociate.cpp +++ b/lib/Transforms/Scalar/Reassociate.cpp @@ -394,13 +394,6 @@ static BinaryOperator *LowerNegateToMultiply(Instruction *Neg) { BinaryOperator *Res = CreateMul(Neg->getOperand(1), NegOne, "", Neg, Neg); Neg->setOperand(1, Constant::getNullValue(Ty)); // Drop use of op. Res->takeName(Neg); - if (Ty->isIntegerTy()) { - bool NSW = cast(Neg)->hasNoSignedWrap(); - bool NUW = cast(Neg)->hasNoUnsignedWrap(); - if (NSW || NUW) - Res->setHasNoSignedWrap(true); - Res->setHasNoUnsignedWrap(NUW); - } Neg->replaceAllUsesWith(Res); Res->setDebugLoc(Neg->getDebugLoc()); return Res;