Compiling the following program with clang results in an error "failed to perform tail call elimination on a call site marked musttail".
struct StageList;
using F = __attribute__((vector_size(16))) float;
using StageFn = void (*)(StageList list, int src, int dst, F r, F g, F b);
struct StageList {
const StageFn* fn;
};
void m(StageList list, int src, int dst, F r, F g, F b) {
[[clang::musttail]]
return (*list.fn)(list, src, dst, r, g, b);
}
My expectation is that tail calls should be usable with any number of arguments provided that they are trivially destructible.
I originally experienced this error when compiling WebKit with gcc https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121784. But it is also reproducible in LLVM:
Compiling the following program with clang results in an error "failed to perform tail call elimination on a call site marked musttail".
My expectation is that tail calls should be usable with any number of arguments provided that they are trivially destructible.
test-a79310.sh
test-a79310.cpp
clang.log