This Reassociate change unintentionally slipped in r222499
[oota-llvm.git] / lib / Transforms / Scalar / Reassociate.cpp
index d37eac56d5185333327d0c8e49ec65db69b3b82f..1bbaaf34603afb89cd5d0c651619c0971333835c 100644 (file)
@@ -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<BinaryOperator>(Neg)->hasNoSignedWrap();
-    bool NUW = cast<BinaryOperator>(Neg)->hasNoUnsignedWrap();
-    if (NSW || NUW)
-      Res->setHasNoSignedWrap(true);
-    Res->setHasNoUnsignedWrap(NUW);
-  }
   Neg->replaceAllUsesWith(Res);
   Res->setDebugLoc(Neg->getDebugLoc());
   return Res;