From 72a2f5d2f4c0e1cbe45123c96c9b0a87d325e092 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Fri, 26 Aug 2011 10:37:57 -0700 Subject: [PATCH] Make SSE2 __popcnt_int64 return i64 to be consistent with other targets --- builtins-sse2.ll | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builtins-sse2.ll b/builtins-sse2.ll index 045915b3..561fb59f 100644 --- a/builtins-sse2.ll +++ b/builtins-sse2.ll @@ -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 }