[GlobalISel][X86] Add G_CTTZ_ZERO_UNDEF/G_CTTZ legalization handling
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 5 Jun 2023 09:14:46 +0000 (10:14 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 5 Jun 2023 10:18:27 +0000 (11:18 +0100)
commit346ee549e5e25a68681b678020df8c38e7b68737
tree8555ab6a0d237a3fb25de4aa4b97fcbc02b999a6
parenta1421797d8795b916fa32a3b383fa692397b28c0
[GlobalISel][X86] Add G_CTTZ_ZERO_UNDEF/G_CTTZ legalization handling

G_CTTZ_ZERO_UNDEF is always legal using the BSF instruction, G_CTTZ requires the BMI1 TZCNT instruction
llvm/lib/Target/X86/X86LegalizerInfo.cpp
llvm/test/CodeGen/X86/GlobalISel/legalize-trailing-zeros-undef.mir [new file with mode: 0644]
llvm/test/CodeGen/X86/GlobalISel/legalize-trailing-zeros.mir [new file with mode: 0644]