commit | 57036da328feb62f50b503a6ac956fc5a8b2dca2 | [log] [tgz] |
---|---|---|
author | Bill Wendling <isanbard@gmail.com> | Mon Dec 01 21:06:30 2008 +0000 |
committer | Bill Wendling <isanbard@gmail.com> | Mon Dec 01 21:06:30 2008 +0000 |
tree | ac5440bd41f4ce48cfce095aca47fb84af25813c | |
parent | 69fffa5437db31eaa9cb2a4d004a4cd02e06bfa3 [diff] |
Don't rebuild RHSNeg. Just use the one that's already there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60370 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 9ee375c..8d76160 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -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); } } }