diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-05-12 13:20:24 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-05-12 13:20:24 +0000 |
commit | a6ed1b2f129950513ced589f9d4f8ee32f7378d9 (patch) | |
tree | f10fb400ead258ad3c25c3c843bdc4ef6538f27b /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 408b272a006a32b4b57ea56bd50f738bea4b5054 (diff) | |
download | bcm5719-llvm-a6ed1b2f129950513ced589f9d4f8ee32f7378d9.tar.gz bcm5719-llvm-a6ed1b2f129950513ced589f9d4f8ee32f7378d9.zip |
Use SDValue::getOperand() helper. NFCI.
llvm-svn: 302896
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 23f597db140..befbd80d796 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -417,11 +417,10 @@ bool TargetLowering::ShrinkDemandedOp(SDValue Op, unsigned BitWidth, if (TLI.isTruncateFree(Op.getValueType(), SmallVT) && TLI.isZExtFree(SmallVT, Op.getValueType())) { // We found a type with free casts. - SDValue X = DAG.getNode(Op.getOpcode(), dl, SmallVT, - DAG.getNode(ISD::TRUNCATE, dl, SmallVT, - Op.getNode()->getOperand(0)), - DAG.getNode(ISD::TRUNCATE, dl, SmallVT, - Op.getNode()->getOperand(1))); + SDValue X = DAG.getNode( + Op.getOpcode(), dl, SmallVT, + DAG.getNode(ISD::TRUNCATE, dl, SmallVT, Op.getOperand(0)), + DAG.getNode(ISD::TRUNCATE, dl, SmallVT, Op.getOperand(1))); bool NeedZext = DemandedSize > SmallVTBits; SDValue Z = DAG.getNode(NeedZext ? ISD::ZERO_EXTEND : ISD::ANY_EXTEND, dl, Op.getValueType(), X); @@ -817,7 +816,7 @@ bool TargetLowering::SimplifyDemandedBits(SDValue Op, // Convert (shl (anyext x, c)) to (anyext (shl x, c)) if the high bits // are not demanded. This will likely allow the anyext to be folded away. if (InOp.getNode()->getOpcode() == ISD::ANY_EXTEND) { - SDValue InnerOp = InOp.getNode()->getOperand(0); + SDValue InnerOp = InOp.getOperand(0); EVT InnerVT = InnerOp.getValueType(); unsigned InnerBits = InnerVT.getSizeInBits(); if (ShAmt < InnerBits && NewMask.getActiveBits() <= InnerBits && |