From d1c99bbfb0571782accb7ca8f8184f1bdf019aae Mon Sep 17 00:00:00 2001 From: nmzik Date: Fri, 2 Oct 2026 12:54:20 +0400 Subject: [PATCH] Consolidate instruction operand bounds checks --- src/graphics/shader/recompiler/ir/Value.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/graphics/shader/recompiler/ir/Value.cpp b/src/graphics/shader/recompiler/ir/Value.cpp index 866111e64..d661677e2 100644 --- a/src/graphics/shader/recompiler/ir/Value.cpp +++ b/src/graphics/shader/recompiler/ir/Value.cpp @@ -187,11 +187,10 @@ size_t Inst::NumPhiBlocks() const { } Value Inst::Arg(size_t index) const { + EXIT_IF(index >= NumArgs()); if (num_args <= InlineArity) { - EXIT_IF(index >= num_args); return fixed_args[index]; } - EXIT_IF(index >= NumArgs()); return num_args == PhiArity ? phi_args[index].second : large_args[index]; }