From 7abf352f4426175c344107b7f14ba229c4d61c37 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sun, 30 Nov 2008 05:29:33 +0000 Subject: [PATCH] Don't make TwoToExp signed by default. llvm-svn: 60279 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index fce23739b665..f3cb747e56f7 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -2960,8 +2960,7 @@ Instruction *InstCombiner::visitSDiv(BinaryOperator &I) { APInt RHSNegAPI(RHSNeg->getBitWidth(), RHSNeg->getSExtValue(), true); APInt NegOne = -APInt(RHSNeg->getBitWidth(), 1, true); - APInt TwoToExp(RHSNeg->getBitWidth(), 1 << (RHSNeg->getBitWidth() - 1), - true); + APInt TwoToExp(RHSNeg->getBitWidth(), 1 << (RHSNeg->getBitWidth() - 1)); // -X/C -> X/-C, if and only if negation doesn't overflow. if ((RHS->getSExtValue() < 0 && RHSNegAPI.slt(TwoToExp - 1)) ||