[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

Devang Patel dpatel at apple.com
Thu Oct 19 18:17:10 PDT 2006



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.524 -> 1.525
---
Log message:

While creating mask, use 1ULL instead of 1.


---
Diffs of the changes:  (+1 -1)

 InstructionCombining.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.524 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.525
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.524	Thu Oct 19 15:59:13 2006
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Thu Oct 19 20:16:56 2006
@@ -5595,7 +5595,7 @@
             unsigned SrcBitSize = Src->getType()->getPrimitiveSizeInBits();
             unsigned DestBitSize = CI.getType()->getPrimitiveSizeInBits();
             assert(SrcBitSize < DestBitSize && "Not a zext?");
-            Constant *C = ConstantUInt::get(Type::ULongTy, (1 << SrcBitSize)-1);
+            Constant *C = ConstantUInt::get(Type::ULongTy, (1ULL << SrcBitSize)-1);
             C = ConstantExpr::getCast(C, CI.getType());
             return BinaryOperator::createAnd(Res, C);
           }






More information about the llvm-commits mailing list