[llvm] [X86] Allow EVEX compression for mask registers (PR #171980)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 22 09:48:01 PST 2025
================
@@ -187,6 +189,53 @@ static bool CompressEVEXImpl(MachineInstr &MI, MachineBasicBlock &MBB,
if (TSFlags & (X86II::EVEX_K | X86II::EVEX_L2))
return false;
+ // Try to compress VPMOV*2M + KMOV chain patterns:
+ // vpmovd2m %xmm0, %k0 -> vmovmskps %xmm0, %eax
+ // kmovb %k0, %eax (erase this)
+ unsigned Opc = MI.getOpcode();
+ if ((Opc == X86::VPMOVD2MZ128kr || Opc == X86::VPMOVD2MZ256kr) &&
----------------
RKSimon wrote:
Handle VMOVMSKPD as well?
https://github.com/llvm/llvm-project/pull/171980
More information about the llvm-commits
mailing list