[clang] [clang][bytecode] Disable tail calls on sparc (PR #189887)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 31 23:52:03 PDT 2026
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/189887
Looks like this causes problems there as well:
https://lab.llvm.org/buildbot/#/builders/114/builds/252
Interp.cpp:2572:21: error: cannot tail-call: target is not able to optimize the call into a sibling call
2572 | MUSTTAIL return Fn(S, PC);
| ~~^~~~~~~
>From 9cbdb05c42fef4eefa3b785018b29a4db422587b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Wed, 1 Apr 2026 08:50:27 +0200
Subject: [PATCH] [clang][bytecode] Disable tail calls on sparc
Looks like this causes problems there as well:
https://lab.llvm.org/buildbot/#/builders/114/builds/252
Interp.cpp:2572:21: error: cannot tail-call: target is not able to optimize the call into a sibling call
2572 | MUSTTAIL return Fn(S, PC);
| ~~^~~~~~~
---
clang/lib/AST/ByteCode/Interp.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index 0a13456e6026d..199ccf1d5a652 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -41,7 +41,7 @@ using namespace clang::interp;
// to handle the way we use tailcalls.
// PPC can't tail-call external calls, which is a problem for InterpNext.
#if defined(_MSC_VER) || defined(__powerpc__) || !defined(MUSTTAIL) || \
- defined(__i386__)
+ defined(__i386__) || defined(__sparc__)
#undef MUSTTAIL
#define MUSTTAIL
#define USE_TAILCALLS 0
More information about the cfe-commits
mailing list