[Aarch64] Customer lowering of CTPOP to SIMD should check for NEON availability
[oota-llvm.git] / lib / Target / AArch64 / AArch64SelectionDAGInfo.cpp
index 1bf64fc4310b29021de02311c30ff85b2cb9e86e..0cfd5826aadf9056a0c0332bf41b2a78d0428867 100644 (file)
@@ -36,8 +36,7 @@ SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemset(
   // instead of memset.
   if (bzeroEntry && (!SizeValue || SizeValue->getZExtValue() > 256)) {
     const AArch64TargetLowering &TLI =
-        *static_cast<const AArch64TargetLowering *>(
-            DAG.getTarget().getTargetLowering());
+        *DAG.getTarget().getSubtarget<AArch64Subtarget>().getTargetLowering();
 
     EVT IntPtr = TLI.getPointerTy();
     Type *IntPtrTy = getDataLayout()->getIntPtrType(*DAG.getContext());