[llvm-commits] [llvm] r60279 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Bill Wendling isanbard at gmail.com
Sat Nov 29 21:29:33 PST 2008


Author: void
Date: Sat Nov 29 23:29:33 2008
New Revision: 60279

URL: http://llvm.org/viewvc/llvm-project?rev=60279&view=rev
Log:
Don't make TwoToExp signed by default.

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=60279&r1=60278&r2=60279&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Sat Nov 29 23:29:33 2008
@@ -2960,8 +2960,7 @@
     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)) ||





More information about the llvm-commits mailing list