From 7a2d15678e729558529e3a14205d2924b3091f5c Mon Sep 17 00:00:00 2001 From: Weiming Zhao Date: Wed, 19 Nov 2014 00:29:14 +0000 Subject: [Aarch64] Customer lowering of CTPOP to SIMD should check for NEON availability llvm-svn: 222292 --- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib') 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 -- cgit v1.2.3