File 1122-AArch64-Omit-more-overflow-checks.patch of Package erlang

From 533c52a2690004be1e88b7fc12294cd613c16382 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
Date: Fri, 1 Sep 2023 18:33:04 +0200
Subject: [PATCH 02/25] AArch64: Omit more overflow checks

---
 erts/emulator/beam/jit/arm/instr_arith.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/erts/emulator/beam/jit/arm/instr_arith.cpp b/erts/emulator/beam/jit/arm/instr_arith.cpp
index dbdb05b86a..0c74430f61 100644
--- a/erts/emulator/beam/jit/arm/instr_arith.cpp
+++ b/erts/emulator/beam/jit/arm/instr_arith.cpp
@@ -32,8 +32,7 @@ void BeamModuleAssembler::emit_add_sub_types(bool is_small_result,
                                              const ArgSource &RHS,
                                              const a64::Gp rhs_reg,
                                              const Label next) {
-    if (exact_type<BeamTypeId::Integer>(LHS) &&
-        exact_type<BeamTypeId::Integer>(RHS) && is_small_result) {
+    if (is_small_result) {
         comment("skipped overflow test because the result is always small");
         emit_are_both_small(LHS, lhs_reg, RHS, rhs_reg, next);
     } else {
-- 
2.35.3

openSUSE Build Service is sponsored by