[clang] [llvm] [WIP][APX] Allow EGPR registers used as non-volatile registers (PR #173224)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 23 04:43:55 PDT 2026
azwolski wrote:
I think we may need add this
```cpp
// Options.td
def mapx_features_egpr_nv_EQ : Joined<["-"], "mapx-features=egpr-nv:">,
Group<m_x86_Features_Group>,
HelpText<"Set number of non-volatile registers of APX EGPR feature">;
// X86.cpp
// Handle -mapx-features=egpr-nv:N
if (A->getOption().matches(options::OPT_mapx_features_egpr_nv_EQ)) {
Features.push_back("+egpr");
continue;
}
// CommonArgs.cpp
if (Arg *A = Args.getLastArg(options::OPT__SLASH_apx_features_egprnv,
options::OPT_mapx_features_egpr_nv_EQ)) {
StringRef Value = A->getValue();
CmdArgs.push_back("-mllvm");
CmdArgs.push_back(Args.MakeArgString("-apx-egpr-csr=" + Value));
}
````
https://github.com/llvm/llvm-project/pull/173224
More information about the cfe-commits
mailing list