[clang] [clang][bytecode] Disable tailcalls on aarch64 (PR #188042)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 23 07:21:39 PDT 2026


https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/188042

Apparently it causes problems there, too.
See https://lab.llvm.org/buildbot/#/builders/24/builds/18781

>From b042c9e35c75a8670f180ebfcd3873a0462926f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Mon, 23 Mar 2026 15:18:52 +0100
Subject: [PATCH] [clang][bytecode] Disable tailcalls on aarch64

Apparently it causes problems there, too.
See https://lab.llvm.org/buildbot/#/builders/24/builds/18781
---
 clang/lib/AST/ByteCode/Interp.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index fc783fe4ec871..e2c9b01f4c7ea 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -40,7 +40,9 @@ using namespace clang::interp;
 // 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.
-#if defined(_MSC_VER) || defined(_ARCH_PPC) || !defined(MUSTTAIL)
+// aarch64 seems to have problems too, at least with sanitizers enabled.
+#if defined(_MSC_VER) || defined(_ARCH_PPC) || defined(__aarch64__) ||         \
+    !defined(MUSTTAIL)
 #define MUSTTAIL
 #define USE_TAILCALLS 0
 #else



More information about the cfe-commits mailing list