diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-10-13 16:11:15 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-10-13 16:11:15 +0000 |
commit | c5d7c6e5f68476fae3144fb2500bbf6d807555b3 (patch) | |
tree | a317237ec8367ca93550704485cc31ed9ba44ccd /llvm/lib/CodeGen | |
parent | 3d22fbd785eb934d94133020195bd9f268f654f4 (diff) | |
download | bcm5719-llvm-c5d7c6e5f68476fae3144fb2500bbf6d807555b3.tar.gz bcm5719-llvm-c5d7c6e5f68476fae3144fb2500bbf6d807555b3.zip |
[X86][SSE] Remove most of vector CTTZ custom lowering and use LegalizeDAG instead.
There is one remnant - AVX1 custom splitting of 256-bit vectors - which is due to a regression where the X86ISD::ANDNP is still performed as a YMM.
I've also tightened the CTLZ or CTPOP lowering in SelectionDAGLegalize::ExpandBitCount to require a legal CTLZ - it doesn't affect existing users and fixes an issue with AVX512 codegen.
llvm-svn: 344457
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 884d7174440..3564a767a09 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -2814,8 +2814,8 @@ SDValue SelectionDAGLegalize::ExpandBitCount(unsigned Opc, SDValue Op, DAG.getNode(ISD::SUB, dl, VT, Op, DAG.getConstant(1, dl, VT))); // If ISD::CTLZ is legal and CTPOP isn't, then do that instead. - if (!TLI.isOperationLegalOrCustom(ISD::CTPOP, VT) && - TLI.isOperationLegalOrCustom(ISD::CTLZ, VT)) + if (!TLI.isOperationLegal(ISD::CTPOP, VT) && + TLI.isOperationLegal(ISD::CTLZ, VT)) return DAG.getNode(ISD::SUB, dl, VT, DAG.getConstant(Len, dl, VT), DAG.getNode(ISD::CTLZ, dl, VT, Tmp3)); |