OSDN Git Service

[LegalizeDAG] Share Vector/Scalar CTTZ Expansion
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 23 Oct 2018 15:37:19 +0000 (15:37 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 23 Oct 2018 15:37:19 +0000 (15:37 +0000)
commite3237d202fb0a963b01d491150c6d6d24d1bffb4
tree8b0e2f946ded2d61bbdd666a11db7aeafc88c058
parent838ac3865fe0ecd6e45d2d4be43bf7ed59cfb06e
[LegalizeDAG] Share Vector/Scalar CTTZ Expansion

As suggested on D53258, this patch demonstrates sharing common CTTZ expansion code between VectorLegalizer and SelectionDAGLegalize by putting it in TargetLowering.

I intend to move CTLZ and (scalar) CTPOP over as well and then update D53258 accordingly.

Differential Revision: https://reviews.llvm.org/D53474

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345039 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/TargetLowering.h
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp