diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-07-26 10:03:07 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-07-26 10:03:07 +0000 |
commit | a424a1f351838d32187063c694c0f405c5e44692 (patch) | |
tree | cf5a4d79f06421300f7936e3a18692d407fcceb9 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 00e89b428b9962c9e0317bf6cb54fa081417f878 (diff) | |
download | bcm5719-llvm-a424a1f351838d32187063c694c0f405c5e44692.tar.gz bcm5719-llvm-a424a1f351838d32187063c694c0f405c5e44692.zip |
[SelectionDAG] GetDemandedBits - update SIGN_EXTEND_INREG op to just call SimplifyMultipleUseDemandedBits.
llvm-svn: 367098
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 9774c5ebc9f..18955489f3d 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2154,6 +2154,7 @@ SDValue SelectionDAG::GetDemandedBits(SDValue V, const APInt &DemandedBits, } case ISD::OR: case ISD::XOR: + case ISD::SIGN_EXTEND_INREG: return TLI->SimplifyMultipleUseDemandedBits(V, DemandedBits, DemandedElts, *this, 0); case ISD::SRL: @@ -2199,15 +2200,6 @@ SDValue SelectionDAG::GetDemandedBits(SDValue V, const APInt &DemandedBits, return getNode(ISD::ANY_EXTEND, SDLoc(V), V.getValueType(), DemandedSrc); break; } - case ISD::SIGN_EXTEND_INREG: - EVT ExVT = cast<VTSDNode>(V.getOperand(1))->getVT(); - unsigned ExVTBits = ExVT.getScalarSizeInBits(); - - // If none of the extended bits are demanded, eliminate the sextinreg. - if (DemandedBits.getActiveBits() <= ExVTBits) - return V.getOperand(0); - - break; } return SDValue(); } |