[PATCH] D133946: [CodeGen] Don't zero callee-save registers with zero-call-used-regs (PR57692)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 15 08:07:18 PDT 2022


nikic created this revision.
nikic added reviewers: void, nickdesaulniers, efriedma, craig.topper.
Herald added subscribers: StephenFan, pengfei, hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Callee save registers must be preserved, so `-fzero-call-used-regs` should not be zeroing them. The previous implementation only did not zero callee save registers that were saved&restored inside the function, but we need preserve all of them

Fixes https://github.com/llvm/llvm-project/issues/57692.


https://reviews.llvm.org/D133946

Files:
  llvm/lib/CodeGen/PrologEpilogInserter.cpp
  llvm/test/CodeGen/AArch64/zero-call-used-regs.ll
  llvm/test/CodeGen/X86/zero-call-used-regs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133946.460415.patch
Type: text/x-patch
Size: 5818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220915/15396c06/attachment.bin>


More information about the llvm-commits mailing list