summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/IntrinsicLowering.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-02 01:01:49 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-02 01:01:49 +0000
commitfad9bd6b92ba9abd71d4112cb5161780cd5d7ce8 (patch)
tree0d50cd9ca6fcd85a3c33211374dc24a07f81d4a0 /llvm/lib/CodeGen/IntrinsicLowering.cpp
parenta5f996bd271f8162e44f69439e888fe8a58a8ed2 (diff)
downloadbcm5719-llvm-fad9bd6b92ba9abd71d4112cb5161780cd5d7ce8.tar.gz
bcm5719-llvm-fad9bd6b92ba9abd71d4112cb5161780cd5d7ce8.zip
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
Diffstat (limited to 'llvm/lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/IntrinsicLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp
index 21b0e514ef6..7b772d78f27 100644
--- a/llvm/lib/CodeGen/IntrinsicLowering.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud