From 6e0b7ffb0b48e5c5db771c8ac0a04a701aa69e0a Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 7 Jan 2015 19:37:26 +0000 Subject: Pull in r222292 from upstream llvm trunk (by Weiming Zhao): [Aarch64] Customer lowering of CTPOP to SIMD should check for NEON availability This ensures llvm's AArch64 backend does not emit floating point instructions if they are disabled. --- contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'contrib') diff --git a/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index f2004ea..df5b3e0 100644 --- a/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -3062,6 +3062,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.1