From 3c49edcaa11f056c58f70e7374932625a4019f3a Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Tue, 12 Dec 2006 01:17:41 +0000 Subject: Change inferred cast creation calls to more specific cast creations. llvm-svn: 32460 --- llvm/lib/CodeGen/IntrinsicLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/IntrinsicLowering.cpp') diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp index 753f4591c63..55f1c3c0ba3 100644 --- a/llvm/lib/CodeGen/IntrinsicLowering.cpp +++ b/llvm/lib/CodeGen/IntrinsicLowering.cpp @@ -239,7 +239,7 @@ static Value *LowerCTPOP(Value *V, Instruction *IP) { for (unsigned i = 1, ct = 0; i != BitSize; i <<= 1, ++ct) { Value *MaskCst = - ConstantExpr::getCast(ConstantInt::get(Type::ULongTy, MaskValues[ct]), + ConstantExpr::getTruncOrBitCast(ConstantInt::get(Type::ULongTy, MaskValues[ct]), V->getType()); Value *LHS = BinaryOperator::createAnd(V, MaskCst, "cppop.and1", IP); Value *VShift = new ShiftInst(Instruction::LShr, V, -- cgit v1.2.3