[PATCH] D130903: [AArch64][GlobalISel] Lower formal arguments of AAPCS & ms_abi variadic functions.

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 12:31:46 PST 2022


mstorsjo added a comment.

In D130903#3992834 <https://reviews.llvm.org/D130903#3992834>, @dzhidzhoev wrote:

> In D130903#3991285 <https://reviews.llvm.org/D130903#3991285>, @mstorsjo wrote:
>
>> I had somewhat missed the scope of this patch - I had only expected it to affect how functions marked `ms_abi` on non-Windows platforms are lowered, while it affects all regular Windows targets too.
>>
>> This caused a pretty severe regression for Windows targets, reproducible with this snippet:
>>
>>   $ cat test.c
>>   double func(double f) {
>>       return f;
>>   }
>>   $ clang -target aarch64-windows -S -o - test.c -fno-asynchronous-unwind-tables
>>   func:
>>   	sub	sp, sp, #16
>>   	str	x0, [sp, #8]
>>   	ldr	d0, [sp, #8]
>>   	add	sp, sp, #16
>>   	ret
>>
>> (The `-fno-asynchronous-unwind-tables` option is only relevant for clarity of the output.)
>>
>> I'll go ahead and push a revert in a moment.
>
> Thank you for catching it! I wonder how win64 tests didn't fail on that. The problem was that during rebase I accidentally changed CCAssignFn arguments, so that all Win64 function was treated as vararg. Fixed it now. Should I recommit?

Thanks for the update! I can run a bunch of tests on it that specifically exercise calling conventions (that I don't otherwise run regularly) - I'll let you know how it fares.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130903/new/

https://reviews.llvm.org/D130903



More information about the llvm-commits mailing list