https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/224288
None >From aafd5bf2c7ac559bcfac54d26cc43faa9b564eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]> Date: Thu, 17 Sep 2026 15:05:43 +0200 Subject: [PATCH] [clang][bytecode] Remove unnecessary stack operations in builtin_expect --- clang/lib/AST/ByteCode/InterpBuiltin.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp index b8e9abed839c6..843850af334a2 100644 --- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp +++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp @@ -861,11 +861,9 @@ static bool interp__builtin_expect(InterpState &S, CodePtr OpPC, if (NumArgs == 3) S.Stk.discard<Floating>(); discard(S.Stk, ArgT); + // Top of the stack is now the first paramter. Leave it there as the return + // value. - APSInt Val; - if (!popToAPSInt(S.Stk, ArgT, Val)) - return false; - pushInteger(S, Val, Call->getType()); return true; } _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
