llvm-project/llvm/test/CodeGen/AArch64/unsupported-cc-call.ll
Matt Arsenault 06e08f38e1
AArch64: Use reportFatalUsageError for unsupported calling conv (#144840)
This probably should emit a DiagnosticInfoUnsupported and use the
default calling convention instead, but then we would need to pass
in the context.

Also move where CCAssignFnForCall is called. It was unnecessarily
called for each argument, so the error wouldn't trigger for functions
with 0 arguments.

This only ensures the error occurs for functions defined with the
calling convention. The error is still missed for outgoing calls
with no arguments. The lowering logic here is convoluted, calling
CCAssignFnForCall for each argument and it does not mirror
LowerFormalArguments so I'm not sure what's going on here.
2025-06-20 15:43:39 +09:00

9 lines
213 B
LLVM

; FIXME: This should error:
; RUN: llc -mtriple=aarch64-- -filetype=null %s
declare amdgpu_gfx void @amdgpu_gfx_func()
define void @call_amdgpu_gfx_func() {
call amdgpu_gfx void @amdgpu_gfx_func()
ret void
}