[all-commits] [llvm/llvm-project] bee696: [Arm64EC] Improve alignment mangling in arm64ec th...

Eli Friedman via All-commits all-commits at lists.llvm.org
Fri May 17 13:36:30 PDT 2024


  Branch: refs/heads/release/18.x
  Home:   https://github.com/llvm/llvm-project
  Commit: bee6966d8efa18041e2e228c3bb7b09c4618677b
      https://github.com/llvm/llvm-project/commit/bee6966d8efa18041e2e228c3bb7b09c4618677b
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2024-05-17 (Fri, 17 May 2024)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp
    M llvm/test/CodeGen/AArch64/arm64ec-entry-thunks.ll
    M llvm/test/CodeGen/AArch64/arm64ec-exit-thunks.ll

  Log Message:
  -----------
  [Arm64EC] Improve alignment mangling in arm64ec thunks. (#90115)

In some cases, MSVC's mangling for arm64ec thunks includes the alignment
of a struct. I added some code to try to match... but it never really
worked right. The issues:

- Alignment is only mangled if it's 16 or more (I guess the default is
supposed to be 8).
- Alignment isn't mangled on return values (since the memory is
allocated by the caller).

The current patch leaves hooks to make alignment mangling work... but
doesn't actually ever mangle alignment: clang never actually encodes a
relevant alignment into the IR. Once we get clang to emit the real
size/alignment of structs, we can start emitting it.


  Commit: 92087868d5d291464056066f3e193eca97621514
      https://github.com/llvm/llvm-project/commit/92087868d5d291464056066f3e193eca97621514
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2024-05-17 (Fri, 17 May 2024)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp
    M llvm/test/CodeGen/AArch64/arm64ec-entry-thunks.ll

  Log Message:
  -----------
  [Arm64EC] Correctly handle sret in entry thunks. (#92326)

I accidentally left out the code to transfer sret attributes to entry
thunks, so values weren't being passed in the right registers, and the
sret pointer wasn't returned in the correct register.

Fixes #90229


Compare: https://github.com/llvm/llvm-project/compare/6456ebbc18a6...92087868d5d2

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list