[all-commits] [llvm/llvm-project] 71aecb: [AArch64] Treat x18 as callee-saved in functions w...
Vladislav Dzhidzhoev via All-commits
all-commits at lists.llvm.org
Tue Aug 2 10:34:20 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 71aecbb75c7d8b603b1882afa7301e54f3091587
https://github.com/llvm/llvm-project/commit/71aecbb75c7d8b603b1882afa7301e54f3091587
Author: Vladislav Dzhidzhoev <vdzhidzhoev at accesssoftek.com>
Date: 2022-08-02 (Tue, 02 Aug 2022)
Changed paths:
M llvm/lib/Target/AArch64/AArch64CallingConvention.td
M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
M llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
A llvm/test/CodeGen/AArch64/win64cc-darwin-backup-x18.ll
Log Message:
-----------
[AArch64] Treat x18 as callee-saved in functions with Windows calling convention on Darwin
rGcf97e0ec42b8 makes $x18 to be treated as callee-saved in functions with
Windows calling convention on non-Windows OSes.
Here we mark $x18 as callee-saved for functions with Windows calling
convention on Darwin, as well as on other non-Windows platforms, in
order to prevent some miscompilations (like miscompilation of
win64cc-darwin-backup-x18.ll).
Since getCalleeSavedRegs doesn't return x18 in list of callee-saved
registers, assignCalleeSavedSpillSlots and determineCalleeSaves
consider different sets of registers as callee-saved. It causes an
error:
```
Assertion failed: ((!HasCalleeSavedStackSize || getCalleeSavedStackSize() == Size) && "Invalid size calculated for callee saves"), function getCalleeSavedStackSize, file
AArch64MachineFunctionInfo.h, line 292.
```
Differential Revision: https://reviews.llvm.org/D130676
More information about the All-commits
mailing list