[AArch64][SVE] Fix PCS for functions taking/returning scalable types.
authorSander de Smalen <sander.desmalen@arm.com>
Mon, 20 Jul 2020 13:43:50 +0000 (14:43 +0100)
committerSander de Smalen <sander.desmalen@arm.com>
Tue, 21 Jul 2020 14:55:39 +0000 (15:55 +0100)
commit9bacf1588583014538a0217add18f370acb95788
tree5256d4967c72e5c7c72ce0d97866d8c84f3902e9
parent44e1a93ccf521c63be866e478fe63d859b34f0b6
[AArch64][SVE] Fix PCS for functions taking/returning scalable types.

The default calling convention needs to save/restore the SVE callee
saves according to the SVE PCS when the function takes or returns
scalable types, even when the `aarch64_sve_vector_pcs` CC is not
specified for the function.

Reviewers: efriedma, paulwalker-arm, david-arm, rengolin

Reviewed By: paulwalker-arm

Differential Revision: https://reviews.llvm.org/D84041
llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
llvm/test/CodeGen/AArch64/sve-calling-convention.ll
llvm/test/CodeGen/AArch64/sve-trunc.ll