OSDN Git Service

[ARM] Minor refactoring. NFC.
authorChad Rosier <mcrosier@codeaurora.org>
Tue, 6 Oct 2015 20:58:42 +0000 (20:58 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Tue, 6 Oct 2015 20:58:42 +0000 (20:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249465 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMISelLowering.cpp

index a3af444..2cc2108 100644 (file)
@@ -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);