For PR1297:

Make sure that the CTPOP result is casted to i32 as the bit counting
intrinsics all return i32 now (this affects CTLZ and CTTZ as well).

llvm-svn: 35567
This commit is contained in:
Reid Spencer 2007-04-02 01:01:49 +00:00
parent a5f996bd27
commit fad9bd6b92
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ static Value *LowerCTPOP(Value *V, Instruction *IP) {
V = BinaryOperator::createAdd(LHS, RHS, "ctpop.step", IP); V = BinaryOperator::createAdd(LHS, RHS, "ctpop.step", IP);
} }
return V; return CastInst::createIntegerCast(V, Type::Int32Ty, false, "ctpop", IP);
} }
/// LowerCTLZ - Emit the code to lower ctlz of V before the specified /// LowerCTLZ - Emit the code to lower ctlz of V before the specified