From: Chad Rosier Date: Tue, 6 Oct 2015 20:58:42 +0000 (+0000) Subject: [ARM] Minor refactoring. NFC. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d851b2f2860622c543755a22a070b00c6898c50b;p=oota-llvm.git [ARM] Minor refactoring. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249465 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index a3af444ced9..2cc2108a6ff 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -9910,8 +9910,10 @@ static SDValue PerformVDIVCombine(SDNode *N, SelectionDAG &DAG, return SDValue(); MVT FloatTy = N->getSimpleValueType(0).getVectorElementType(); + uint32_t FloatBits = FloatTy.getSizeInBits(); MVT IntTy = Op.getOperand(0).getSimpleValueType().getVectorElementType(); - if (FloatTy.getSizeInBits() != 32 || IntTy.getSizeInBits() > 32) { + uint32_t IntBits = IntTy.getSizeInBits(); + if (FloatBits != 32 || IntBits > 32) { // These instructions only exist converting from i32 to f32. We can handle // smaller integers by generating an extra extend, but larger ones would // be lossy. @@ -9921,7 +9923,7 @@ static SDValue PerformVDIVCombine(SDNode *N, SelectionDAG &DAG, SDLoc dl(N); SDValue ConvInput = Op.getOperand(0); unsigned NumLanes = Op.getValueType().getVectorNumElements(); - if (IntTy.getSizeInBits() < FloatTy.getSizeInBits()) + if (IntBits < FloatBits) ConvInput = DAG.getNode(isSigned ? ISD::SIGN_EXTEND : ISD::ZERO_EXTEND, dl, NumLanes == 2 ? MVT::v2i32 : MVT::v4i32, ConvInput);