From 1e68e2a33d20686a8863749b895426e91b8a41b7 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Wed, 7 Oct 2015 13:40:44 +0000 Subject: [PATCH] [ARM] Push more complex check down to reduce compile time. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249547 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMISelLowering.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 2cc2108a6ff..a0b482080c8 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -9848,11 +9848,6 @@ static SDValue PerformVCVTCombine(SDNode *N, SelectionDAG &DAG, if (!isa(ConstVec)) return SDValue(); - uint64_t C; - bool isSigned = N->getOpcode() == ISD::FP_TO_SINT; - if (!isConstVecPow2(ConstVec, isSigned, C)) - return SDValue(); - MVT FloatTy = Op.getSimpleValueType().getVectorElementType(); uint32_t FloatBits = FloatTy.getSizeInBits(); MVT IntTy = N->getSimpleValueType(0).getVectorElementType(); @@ -9866,6 +9861,11 @@ static SDValue PerformVCVTCombine(SDNode *N, SelectionDAG &DAG, return SDValue(); } + uint64_t C; + bool isSigned = N->getOpcode() == ISD::FP_TO_SINT; + if (!isConstVecPow2(ConstVec, isSigned, C)) + return SDValue(); + SDLoc dl(N); unsigned IntrinsicOpcode = isSigned ? Intrinsic::arm_neon_vcvtfp2fxs : Intrinsic::arm_neon_vcvtfp2fxu; @@ -9904,11 +9904,6 @@ static SDValue PerformVDIVCombine(SDNode *N, SelectionDAG &DAG, if (!isa(ConstVec)) return SDValue(); - uint64_t C; - bool isSigned = OpOpcode == ISD::SINT_TO_FP; - if (!isConstVecPow2(ConstVec, isSigned, C)) - return SDValue(); - MVT FloatTy = N->getSimpleValueType(0).getVectorElementType(); uint32_t FloatBits = FloatTy.getSizeInBits(); MVT IntTy = Op.getOperand(0).getSimpleValueType().getVectorElementType(); @@ -9920,6 +9915,11 @@ static SDValue PerformVDIVCombine(SDNode *N, SelectionDAG &DAG, return SDValue(); } + uint64_t C; + bool isSigned = OpOpcode == ISD::SINT_TO_FP; + if (!isConstVecPow2(ConstVec, isSigned, C)) + return SDValue(); + SDLoc dl(N); SDValue ConvInput = Op.getOperand(0); unsigned NumLanes = Op.getValueType().getVectorNumElements(); -- 2.34.1