[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
Tue Feb 7 06:03:17 PST 2023


AntonBikineev added a comment.

In D143425#4109955 <https://reviews.llvm.org/D143425#4109955>, @pengfei wrote:

>> This covers the broken scenario.
>
> Can you explain it in more detail? I checked the test locally but found no difference in codegen with or without the new change.

Did you include the original (broken) CL in the baseline? The CL was reverted, so you'd have to apply it to see the codegen diff. But the diff is basically this:

    _preserve_mostcc1:                      ## @preserve_mostcc1
    ## %bb.0:                               ## %entry
          pushq   %r10
          pushq   %r9
          pushq   %r8
  +       pushq   %rdi
  +       pushq   %rsi
          pushq   %rdx
          pushq   %rcx
          pushq   %rax
          pushq   %rbp
          pushq   %r15
          pushq   %r14
          pushq   %r13
          pushq   %r12
          pushq   %rbx
          ## InlineAsm Start
          ## InlineAsm End
          popq    %rbx
          popq    %r12
          popq    %r13
          popq    %r14
          popq    %r15
          popq    %rbp
          popq    %rax
          popq    %rcx
          popq    %rdx
  +       popq    %rsi
  +       popq    %rdi
          popq    %r8
          popq    %r9
          popq    %r10
          retq

The original (broken) CL didn't preserve parameter regs (%rdi, %rsi).


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