diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-02 01:01:49 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-02 01:01:49 +0000 |
commit | dc1966e6bac9d323e18db2e18d955885e0edd702 (patch) | |
tree | a6c09548fe4735349d7414ab4fee04091aacd119 /lib/CodeGen/IntrinsicLowering.cpp | |
parent | 86189a446032240013f08b5172590726572188cc (diff) |
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r-- | lib/CodeGen/IntrinsicLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp index 21b0e514ef..7b772d78f2 100644 --- a/lib/CodeGen/IntrinsicLowering.cpp +++ b/lib/CodeGen/IntrinsicLowering.cpp @@ -218,7 +218,7 @@ static Value *LowerCTPOP(Value *V, Instruction *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 |