[llvm] r222500 - This Reassociate change unintentionally slipped in r222499

David Majnemer david.majnemer at gmail.com
Thu Nov 20 18:37:38 PST 2014


Author: majnemer
Date: Thu Nov 20 20:37:38 2014
New Revision: 222500

URL: http://llvm.org/viewvc/llvm-project?rev=222500&view=rev
Log:
This Reassociate change unintentionally slipped in r222499

Modified:
    llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp?rev=222500&r1=222499&r2=222500&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp Thu Nov 20 20:37:38 2014
@@ -394,13 +394,6 @@ static BinaryOperator *LowerNegateToMult
   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;





More information about the llvm-commits mailing list