diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-12-01 21:06:30 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-12-01 21:06:30 +0000 |
commit | 6f71bce4cf90249d0cba6e5b450e390fa075e64e (patch) | |
tree | 5082a7c9caeca24a596f241852e01f24e3bee963 | |
parent | 84f6f2539f7a0a363e1b38bcff0c7ac21d301e2a (diff) | |
download | bcm5719-llvm-6f71bce4cf90249d0cba6e5b450e390fa075e64e.tar.gz bcm5719-llvm-6f71bce4cf90249d0cba6e5b450e390fa075e64e.zip |
Don't rebuild RHSNeg. Just use the one that's already there.
llvm-svn: 60370
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 9ee375c3825..8d7616053b1 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -2937,8 +2937,7 @@ Instruction *InstCombiner::visitSDiv(BinaryOperator &I) { 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); } } } |