summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Transforms/Scalar/Reassociate.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index d37eac56d51..1bbaaf34603 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<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;
OpenPOWER on IntegriCloud