summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorWeiming Zhao <weimingz@codeaurora.org>2014-11-19 00:29:14 +0000
committerWeiming Zhao <weimingz@codeaurora.org>2014-11-19 00:29:14 +0000
commit7a2d15678e729558529e3a14205d2924b3091f5c (patch)
tree6df942ea2399da32a192116b0f2c5472560e497c /llvm/lib
parentc9d251e4d17c47504702d0a5b040ac20414f5ba7 (diff)
downloadbcm5719-llvm-7a2d15678e729558529e3a14205d2924b3091f5c.tar.gz
bcm5719-llvm-7a2d15678e729558529e3a14205d2924b3091f5c.zip
[Aarch64] Customer lowering of CTPOP to SIMD should check for NEON availability
llvm-svn: 222292
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelLowering.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 04ea60c51b0..275ae6e5c42 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -3433,6 +3433,9 @@ SDValue AArch64TargetLowering::LowerCTPOP(SDValue Op, SelectionDAG &DAG) const {
AttributeSet::FunctionIndex, Attribute::NoImplicitFloat))
return SDValue();
+ if (!Subtarget->hasNEON())
+ return SDValue();
+
// While there is no integer popcount instruction, it can
// be more efficiently lowered to the following sequence that uses
// AdvSIMD registers/instructions as long as the copies to/from
OpenPOWER on IntegriCloud