[PATCH] D143425: Reland "[X86][ABI] Don't preserve return regs for preserve_all/preserve_most CCs""

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 06:27:01 PST 2023


pengfei added a comment.

In D143425#4109985 <https://reviews.llvm.org/D143425#4109985>, @AntonBikineev wrote:

> 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:

No, I compared between commenting out `if (ShouldDisableArgRegs) {` and not, and didn't see any difference. Or I misunderstood something?

>     _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).

That meets my expectation, I just didn't confirm it.


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