[clang] [clang][bytecode] Disable tail calls on sparc (PR #189887)

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 31 23:52:35 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

<details>
<summary>Changes</summary>

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);
      |                   ~~^~~~~~~

---
Full diff: https://github.com/llvm/llvm-project/pull/189887.diff


1 Files Affected:

- (modified) clang/lib/AST/ByteCode/Interp.cpp (+1-1) 


``````````diff
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

``````````

</details>


https://github.com/llvm/llvm-project/pull/189887


More information about the cfe-commits mailing list