summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-09-08 00:47:31 +0000
committerCraig Topper <craig.topper@gmail.com>2013-09-08 00:47:31 +0000
commit0a63e1da92b608fe8638c66efd07bd50804eb5fe (patch)
treef828ca59aa5341f1eef975e3e5d3f2a779e4ea97
parent37c921e354265c833956877d9ad235a50828f61a (diff)
downloadbcm5719-llvm-0a63e1da92b608fe8638c66efd07bd50804eb5fe.tar.gz
bcm5719-llvm-0a63e1da92b608fe8638c66efd07bd50804eb5fe.zip
Using popcount should check the popcount feature flag not the SSE41 feature flag.
llvm-svn: 190258
-rw-r--r--llvm/lib/Target/X86/X86TargetTransformInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
index 5f81d338720..935a6da5d55 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
@@ -127,8 +127,8 @@ X86TTI::PopcntSupportKind X86TTI::getPopcntSupport(unsigned TyWidth) const {
assert(isPowerOf2_32(TyWidth) && "Ty width must be power of 2");
// TODO: Currently the __builtin_popcount() implementation using SSE3
// instructions is inefficient. Once the problem is fixed, we should
- // call ST->hasSSE3() instead of ST->hasSSE4().
- return ST->hasSSE41() ? PSK_FastHardware : PSK_Software;
+ // call ST->hasSSE3() instead of ST->hasPOPCNT().
+ return ST->hasPOPCNT() ? PSK_FastHardware : PSK_Software;
}
unsigned X86TTI::getNumberOfRegisters(bool Vector) const {
OpenPOWER on IntegriCloud