diff options
| author | Weiming Zhao <weimingz@codeaurora.org> | 2014-11-19 00:29:14 +0000 |
|---|---|---|
| committer | Weiming Zhao <weimingz@codeaurora.org> | 2014-11-19 00:29:14 +0000 |
| commit | 7a2d15678e729558529e3a14205d2924b3091f5c (patch) | |
| tree | 6df942ea2399da32a192116b0f2c5472560e497c /llvm/lib | |
| parent | c9d251e4d17c47504702d0a5b040ac20414f5ba7 (diff) | |
| download | bcm5719-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.cpp | 3 |
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 |

