[llvm-dev] [CodeGen] RFC Changing the default operation action for CTLZ_ZERO_UNDEF/CTTZ_ZERO_UNDEF to Expand
Chandler Carruth via llvm-dev
llvm-dev at lists.llvm.org
Sun Apr 24 23:15:57 PDT 2016
LGTM, although I suspect others' opinions are more relevant than mine...
On Mon, Apr 25, 2016 at 2:08 AM Craig Topper <craig.topper at gmail.com> wrote:
> I'd like to change the default operation action for CTLZ_ZERO_UNDEF and
> CTTZ_ZERO_UNDEF to Expand in TargetLoweringBase. This will make LegalizeDAG
> automatically turn them into CTLZ and CTTZ.
> For the in-tree targets, only AMDGPU and X86 have cases where these
> instructions should be the current default value of Legal. There a few
> cases where targets set them to Custom. But most targets set them to Expand
> to have LegalizeDAG convert them.
> This change would allow us to remove all the setOperationAction calls to
> make them Expand on most targets and adds a few calls to setOperationAction
> on X86 and AMDGPU to make them Legal again for certain cases.
> This could affect out of tree targets, but its easy to fix any out of tree
> targets that rely on the current default Legal value. Any out of tree
> targets that were already setting them to Expand will to continue to work,
> but just have redundant code.
> Any objections?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev