From 1f44142e4e65af0b4ac94d307c37df0e873c6e30 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 21 Nov 2014 02:37:38 +0000 Subject: [PATCH] This Reassociate change unintentionally slipped in r222499 llvm-svn: 222500 --- llvm/lib/Transforms/Scalar/Reassociate.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp index d37eac5..1bbaaf3 100644 --- a/llvm/lib/Transforms/Scalar/Reassociate.cpp +++ b/llvm/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; -- 2.7.4