[all-commits] [llvm/llvm-project] 68d6fe: [X86][CodeGen] Prefer KMOVkk_EVEX than KMOVkk when...
Shengchen Kan via All-commits
all-commits at lists.llvm.org
Sat Dec 2 06:43:15 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 68d6fe508ce1fb2a70220975036d267f564fe54d
https://github.com/llvm/llvm-project/commit/68d6fe508ce1fb2a70220975036d267f564fe54d
Author: Shengchen Kan <shengchen.kan at intel.com>
Date: 2023-12-02 (Sat, 02 Dec 2023)
Changed paths:
M llvm/lib/Target/X86/X86DomainReassignment.cpp
M llvm/lib/Target/X86/X86InstrInfo.cpp
A llvm/test/CodeGen/X86/apx/kmov-kk.ll
Log Message:
-----------
[X86][CodeGen] Prefer KMOVkk_EVEX than KMOVkk when EGPR is supported (#74048)
In memory fold table, we have
```
{X86::KMOVDkk, X86::KMOVDkm, 0},
{X86::KMOVDkk_EVEX, X86::KMOVDkm_EVEX, 0}
```
where `KMOVDkm_EVEX` can use EGPR as base and index registers, while
`KMOVDkm` can't. Hence, though `KMOVkk` does not have any GPR operands,
we prefer to use `KMOVDkk_EVEX` to help register allocation.
It will be compressed to `KMOVDkk` in EVEX2VEX pass if memory folding
does not happen.
More information about the All-commits
mailing list