diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-10-30 17:53:51 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-10-30 17:53:51 +0000 |
commit | 5da11dfd2400c8e3e6dffa34643e7967b57f8060 (patch) | |
tree | 646d0d29ad152e5e8ce9ae9a11a48d7462b41309 /llvm/lib/CodeGen | |
parent | ce82f7b6948dd845d03f28daa9a0e0f648e63134 (diff) | |
download | bcm5719-llvm-5da11dfd2400c8e3e6dffa34643e7967b57f8060.tar.gz bcm5719-llvm-5da11dfd2400c8e3e6dffa34643e7967b57f8060.zip |
[SelectionDAG] Add SELECT demanded elts support to ComputeNumSignBits
llvm-svn: 316933
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 27a02bb6b95..f07ffc4d900 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -3182,15 +3182,16 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, const APInt &DemandedElts, case ISD::SELECT: case ISD::VSELECT: - Tmp = ComputeNumSignBits(Op.getOperand(1), Depth+1); + Tmp = ComputeNumSignBits(Op.getOperand(1), DemandedElts, Depth+1); if (Tmp == 1) return 1; // Early out. - Tmp2 = ComputeNumSignBits(Op.getOperand(2), Depth+1); + Tmp2 = ComputeNumSignBits(Op.getOperand(2), DemandedElts, Depth+1); return std::min(Tmp, Tmp2); case ISD::SELECT_CC: - Tmp = ComputeNumSignBits(Op.getOperand(2), Depth+1); + Tmp = ComputeNumSignBits(Op.getOperand(2), DemandedElts, Depth+1); if (Tmp == 1) return 1; // Early out. - Tmp2 = ComputeNumSignBits(Op.getOperand(3), Depth+1); + Tmp2 = ComputeNumSignBits(Op.getOperand(3), DemandedElts, Depth+1); return std::min(Tmp, Tmp2); + case ISD::SMIN: case ISD::SMAX: case ISD::UMIN: |