[llvm] r249465 - [ARM] Minor refactoring. NFC.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 13:58:42 PDT 2015


Author: mcrosier
Date: Tue Oct  6 15:58:42 2015
New Revision: 249465

URL: http://llvm.org/viewvc/llvm-project?rev=249465&view=rev
Log:
[ARM] Minor refactoring. NFC.

Modified:
    llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=249465&r1=249464&r2=249465&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Oct  6 15:58:42 2015
@@ -9910,8 +9910,10 @@ static SDValue PerformVDIVCombine(SDNode
     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
   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);




More information about the llvm-commits mailing list