[llvm] [X86] Prefer andl to andb to save one byte encoding when using with bzhi or bextr (PR #86921)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 00:22:20 PDT 2024


phoebewang wrote:

> > * As I mentioned above, it is considered beneficial for bzhi/bextr, which matches with GCC;
> 
> It's been a long time since I looked, but I thought gcc generally avoids 8 bit registers. Not just for bzhi/bextr.

Do you have an example in mind, I did some simple experiment, the Clang code generation looks good to me https://godbolt.org/z/6h3W348WM

https://github.com/llvm/llvm-project/pull/86921


More information about the llvm-commits mailing list