[llvm-commits] [llvm] r60370 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Bill Wendling
isanbard at gmail.com
Mon Dec 1 13:06:30 PST 2008
Author: void
Date: Mon Dec 1 15:06:30 2008
New Revision: 60370
URL: http://llvm.org/viewvc/llvm-project?rev=60370&view=rev
Log:
Don't rebuild RHSNeg. Just use the one that's already there.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=60370&r1=60369&r2=60370&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon Dec 1 15:06:30 2008
@@ -2937,8 +2937,7 @@
if (RHS != RHSNeg) { // Check that there is no overflow.
Constant *CINeg = ConstantExpr::getNeg(CI);
if (CI != CINeg) // Check that there is no overflow.
- return BinaryOperator::CreateSDiv(LHSNeg,
- ConstantExpr::getNeg(RHS));
+ return BinaryOperator::CreateSDiv(LHSNeg, RHSNeg);
}
}
}
More information about the llvm-commits
mailing list