[llvm-branch-commits] [clang] release/23.x: [clang][bytecode] disable tail calls on mips (#229679) (PR #229974)

Tobias Hieta via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Oct 14 05:56:57 PDT 2026


https://github.com/tru updated https://github.com/llvm/llvm-project/pull/229974

>From 7ecfb0c64ada007a1932feb49efd568af302afbc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= <alex at alexrp.com>
Date: Thu, 8 Oct 2026 04:18:14 +0200
Subject: [PATCH] [clang][bytecode] disable tail calls on mips (#229679)

As for the other architectures, this caused a Clang build for MIPS to
fail.

(cherry picked from commit cbc387549f1d218959827d90c4d45541f74b7da2)
---
 clang/lib/AST/ByteCode/Interp.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index 58bbf4aaf5f895..46d161e604700b 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -39,9 +39,10 @@ using namespace clang::interp;
 // On MSVC, musttail does not guarantee tail calls in debug mode.
 // We disable it on MSVC generally since it doesn't seem to be able
 // to handle the way we use tailcalls.
-// PPC can't tail-call external calls, which is a problem for InterpNext.
+// MIPS and PPC can't tail-call external calls, which is a problem for
+// InterpNext.
 #if defined(_MSC_VER) || defined(__powerpc__) || !defined(MUSTTAIL) ||         \
-    defined(__i386__) || defined(__sparc__)
+    defined(__i386__) || defined(__sparc__) || defined(__mips__)
 #undef MUSTTAIL
 #define MUSTTAIL
 #define USE_TAILCALLS 0



More information about the llvm-branch-commits mailing list