Make SSE2 __popcnt_int64 return i64 to be consistent with other targets

This commit is contained in:
Matt Pharr
2011-08-26 10:37:57 -07:00
parent 606cbab0d4
commit 72a2f5d2f4

View File

@@ -285,10 +285,9 @@ define internal i32 @__popcnt_int32(i32) nounwind readonly alwaysinline {
ret i32 %val
}
define internal i32 @__popcnt_int64(i64) nounwind readnone alwaysinline {
define internal i64 @__popcnt_int64(i64) nounwind readnone alwaysinline {
%val = call i64 @llvm.ctpop.i64(i64 %0)
%val32 = trunc i64 %val to i32
ret i32 %val32
ret i64 %val
}