diff options
author | Chad Rosier <mcrosier@codeaurora.org> | 2015-10-06 20:58:42 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@codeaurora.org> | 2015-10-06 20:58:42 +0000 |
commit | dca46b426fe04f4f8be0cf943612d10732b54dd0 (patch) | |
tree | 9b06f35291704505b9b48658ced40c9e7432be19 /llvm/lib | |
parent | aed910b7d7f01d0465c930b39cd340a9873e9694 (diff) | |
download | bcm5719-llvm-dca46b426fe04f4f8be0cf943612d10732b54dd0.tar.gz bcm5719-llvm-dca46b426fe04f4f8be0cf943612d10732b54dd0.zip |
[ARM] Minor refactoring. NFC.
llvm-svn: 249465
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index a3af444ced9..2cc2108a6ff 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/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); |