This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Add fatal error for unnamed SVE variadic arguments
ClosedPublic

Authored by david-arm on Oct 27 2020, 7:19 AM.

Details

Summary

We don't currently support passing unnamed variadic SVE arguments
so I've added a fatal error if we hit such cases to prevent any
silent ABI issues in future.

Diff Detail

Event Timeline

david-arm created this revision.Oct 27 2020, 7:19 AM
david-arm requested review of this revision.Oct 27 2020, 7:19 AM
sdesmalen added inline comments.Oct 27 2020, 9:33 AM
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
4802

Does this also report a fatal error if ArgVT is a named argument?

i.e. declare i32 @sve_printf(i8*, <vscale x 4 x i32> %v, ...) and then calling with:

call i32 (i8*, <vscale x 4 x i32>, ...) @sve_printf(i8* %f, <vscale x 4 x i32> %x)
david-arm marked an inline comment as done.

We should have corresponding handling for va_arg. (clang doesn't produce va_arg instructions, but other frontends do.)

david-arm updated this revision to Diff 301567.Oct 29 2020, 4:19 AM
  • Added fatal errors on the callee side when one of the variadic arguments is a scalable vector.
This revision is now accepted and ready to land.Oct 29 2020, 11:40 AM
sdesmalen accepted this revision.Oct 30 2020, 4:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 30 2020, 6:36 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript