Page MenuHomePhabricator

[AArch64][SVE] SVE functions should use the SVE calling convention for fast calls

Authored by bsmith on Mar 31 2021, 5:28 AM.



When an SVE function calls another SVE function using the C calling
convention we use the more efficient SVE VectorCall PCS. However,
for the Fast calling convention we're incorrectly falling back to
the generic AArch64 PCS.

This patch adds the same "can use SVE vector calling convention"
detection used by CallingConv::C to CallingConv::Fast.

Co-authored-by: Paul Walker <>

Diff Detail

Event Timeline

bsmith created this revision.Mar 31 2021, 5:28 AM
bsmith requested review of this revision.Mar 31 2021, 5:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2021, 5:28 AM

Can you also add a test to llvm/test/CodeGen/AArch64/sve-calling-convention.ll to check that the right calling-convention is used when lowering the call instruction?

bsmith updated this revision to Diff 334447.Mar 31 2021, 8:07 AM
  • Add extra tests that explicitly check the calling convention used
sdesmalen accepted this revision.Mar 31 2021, 8:59 AM

Thanks for added test, LGTM!

This revision is now accepted and ready to land.Mar 31 2021, 8:59 AM