[all-commits] [llvm/llvm-project] 511ba4: [X86][MC][CodeGen] Support EGPR for KMOV (#73781)

Shengchen Kan via All-commits all-commits at lists.llvm.org
Thu Nov 30 00:14:07 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 511ba45a47d6f9e48ad364181830c9fb974135b2
      https://github.com/llvm/llvm-project/commit/511ba45a47d6f9e48ad364181830c9fb974135b2
  Author: Shengchen Kan <shengchen.kan at intel.com>
  Date:   2023-11-30 (Thu, 30 Nov 2023)

  Changed paths:
    M llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
    M llvm/lib/Target/X86/X86DomainReassignment.cpp
    M llvm/lib/Target/X86/X86ExpandPseudo.cpp
    M llvm/lib/Target/X86/X86InstrAVX512.td
    M llvm/lib/Target/X86/X86InstrInfo.cpp
    M llvm/lib/Target/X86/X86InstrInfo.td
    A llvm/test/CodeGen/X86/apx/kmov-copy-to-from-asymmetric-reg.ll
    A llvm/test/CodeGen/X86/apx/kmov-domain-assignment.ll
    A llvm/test/CodeGen/X86/apx/kmov-isel.ll
    A llvm/test/CodeGen/X86/apx/kmov-postrapseudos.ll
    A llvm/test/MC/Disassembler/X86/apx/kmov.txt
    A llvm/test/MC/X86/apx/kmov-att.s
    A llvm/test/MC/X86/apx/kmov-intel.s
    M llvm/test/TableGen/x86-fold-tables.inc

  Log Message:
  -----------
  [X86][MC][CodeGen] Support EGPR for KMOV (#73781)

KMOV is essential for copy between k-registers and GPRs.
R16-R31 was added into GPRs in #70958, so we extend KMOV for these new
registers first.

This patch
1.  Promotes KMOV instructions from VEX space to EVEX space
2.  Emits prefix {evex} for the EVEX variants
3. Prefers EVEX variant than VEX variant in ISEL and optimizations for
better RA

EVEX variants will be compressed to VEX variants by existing EVEX2VEX
pass if no EGPR is used.

RFC:
https://discourse.llvm.org/t/rfc-design-for-apx-feature-egpr-and-ndd-support/73031/4
TAG: llvm-test-suite && CPU2017 can be built with feature egpr
successfully.




More information about the All-commits mailing list