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

Nick Lewycky nicholas at mxc.ca
Wed Jul 9 00:35:27 PDT 2008


Author: nicholas
Date: Wed Jul  9 02:35:26 2008
New Revision: 53283

URL: http://llvm.org/viewvc/llvm-project?rev=53283&view=rev
Log:
Simplify, suggested by Chris Lattner.

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=53283&r1=53282&r2=53283&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Wed Jul  9 02:35:26 2008
@@ -3478,7 +3478,7 @@
       case Instruction::LShr:
         // (1 << x) & 1 --> zext(x == 0)
         // (1 >> x) & 1 --> zext(x == 0)
-        if (AndRHSMask.getLimitedValue() == 1 && Op0LHS == AndRHS) {
+        if (AndRHSMask == 1 && Op0LHS == AndRHS) {
           Instruction *NewICmp = new ICmpInst(ICmpInst::ICMP_EQ, Op0RHS,
                                            Constant::getNullValue(I.getType()));
           InsertNewInstBefore(NewICmp, I);





More information about the llvm-commits mailing list