[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
Thu Oct 2 06:55:44 PDT 2025


phoebewang wrote:

> @phoebewang Sorry for pinging such an old issue, but afaict you confirmed that there isn't a general case for this and its only beneficial as a BZHI/BEXTR fold correct?

I think @topperc is correct, i.e., we don't promote i8 in general like GCC does. In `isTypeDesirableForOp` we only promote for a few i16 opcodes and i8 MUL/SHL. Not sure why we are conservative here.

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


More information about the llvm-commits mailing list