Author: Timm Baeder Date: 2026-09-17T17:46:34+02:00 New Revision: 402b3f12f8aee7e461006c528cb1cbbc0398414a
URL: https://github.com/llvm/llvm-project/commit/402b3f12f8aee7e461006c528cb1cbbc0398414a DIFF: https://github.com/llvm/llvm-project/commit/402b3f12f8aee7e461006c528cb1cbbc0398414a.diff LOG: [clang][bytecode] Remove unnecessary stack operations in builtin_expect (#224288) Added: Modified: clang/lib/AST/ByteCode/InterpBuiltin.cpp Removed: ################################################################################ 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
