[PATCH] D143425: Reland "[X86][ABI] Don't preserve return regs for preserve_all/preserve_most CCs""
Anton Bikineev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 8 10:42:50 PST 2023
AntonBikineev added a comment.
In D143425#4113345 <https://reviews.llvm.org/D143425#4113345>, @goldstein.w.n wrote:
> should there be a test with avx512 for `xmm16-31`?
Actually, `preserve_all` doesn't preserve them, which is apparently missing, since the CCs were introduced short after AVX512 was proposed. It would probably make sense to introduce
def CSR_64_RT_AllRegs_AVX512 : CalleeSavedRegs<(add CSR_64_RT_MostRegs,
(sequence "ZMM%u", 0, 31))>;
but I believe it should go to a separate change.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:3388
+ CallConv != CallingConv::PreserveAll &&
+ CallConv != CallingConv::PreserveMost)
MF.getRegInfo().disableCalleeSavedRegister(RetValReg);
----------------
goldstein.w.n wrote:
> `CallConv == CallingConv::X86_RegCall`
This would also need `|| MF.getFunction().hasFnAttribute("no_caller_saved_registers")`, so I don't think it'd be more readable overall.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143425/new/
https://reviews.llvm.org/D143425
More information about the llvm-commits
mailing list