diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-06-21 16:44:51 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-06-21 16:44:51 +0000 |
| commit | 0da13ed1f67f6ef2d3c21af7eb29e47f4795a0cc (patch) | |
| tree | 8c6786a809b8a213c2c73157f4219f387f2a1513 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
| parent | 8f25a021dd12c96678992eb51d6d0a01e7a1e2f4 (diff) | |
| download | bcm5719-llvm-0da13ed1f67f6ef2d3c21af7eb29e47f4795a0cc.tar.gz bcm5719-llvm-0da13ed1f67f6ef2d3c21af7eb29e47f4795a0cc.zip | |
[DAGCombine] narrowExtractedVectorBinOp - pull out repeated getOpcode(). NFCI.
llvm-svn: 364076
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 4f4f502442d..68f6a1becae 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -17937,7 +17937,8 @@ static SDValue narrowExtractedVectorBinOp(SDNode *Extract, SelectionDAG &DAG) { // feeding an extract subvector. const TargetLowering &TLI = DAG.getTargetLoweringInfo(); SDValue BinOp = peekThroughBitcasts(Extract->getOperand(0)); - if (!TLI.isBinOp(BinOp.getOpcode()) || BinOp.getNode()->getNumValues() != 1) + unsigned BOpcode = BinOp.getOpcode(); + if (!TLI.isBinOp(BOpcode) || BinOp.getNode()->getNumValues() != 1) return SDValue(); // The binop must be a vector type, so we can extract some fraction of it. @@ -17966,7 +17967,6 @@ static SDValue narrowExtractedVectorBinOp(SDNode *Extract, SelectionDAG &DAG) { // Bail out if the target does not support a narrower version of the binop. EVT NarrowBVT = EVT::getVectorVT(*DAG.getContext(), WideBVT.getScalarType(), WideNumElts / NarrowingRatio); - unsigned BOpcode = BinOp.getOpcode(); if (!TLI.isOperationLegalOrCustomOrPromote(BOpcode, NarrowBVT)) return SDValue(); |

