This case isn't needed with recent changes to ConstantInt::get
authorChris Lattner <sabre@nondot.org>
Tue, 12 Dec 2006 05:19:46 +0000 (05:19 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 12 Dec 2006 05:19:46 +0000 (05:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32472 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/IntrinsicLowering.cpp

index 55f1c3c0ba3c6c68734a086e2ae7f44925de1708..f18d5f9a4f7e1c6fbe5e4ab02fb24f9646f2530a 100644 (file)
@@ -238,9 +238,7 @@ static Value *LowerCTPOP(Value *V, Instruction *IP) {
   unsigned BitSize = V->getType()->getPrimitiveSizeInBits();
 
   for (unsigned i = 1, ct = 0; i != BitSize; i <<= 1, ++ct) {
-    Value *MaskCst =
-      ConstantExpr::getTruncOrBitCast(ConstantInt::get(Type::ULongTy, MaskValues[ct]),
-                                             V->getType());
+    Value *MaskCst = ConstantInt::get(V->getType(), MaskValues[ct]);
     Value *LHS = BinaryOperator::createAnd(V, MaskCst, "cppop.and1", IP);
     Value *VShift = new ShiftInst(Instruction::LShr, V,
                       ConstantInt::get(Type::UByteTy, i), "ctpop.sh", IP);