Skip to content

Commit 9f578b2

Browse files
authored
Merge pull request erlang#6616 from erlang/john/jit/fix-add-sub-aarch64
jit: Fix type check in add/subtract on aarch64
2 parents 08f322d + d119731 commit 9f578b2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

erts/emulator/beam/jit/arm/instr_arith.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ void BeamModuleAssembler::emit_add_sub_types(bool is_small_result,
3232
const ArgSource &RHS,
3333
const a64::Gp rhs_reg,
3434
const Label next) {
35-
if (is_small_result &&
36-
always_one_of(LHS, BEAM_TYPE_INTEGER | BEAM_TYPE_MASK_BOXED) &&
37-
always_one_of(RHS, BEAM_TYPE_INTEGER | BEAM_TYPE_MASK_BOXED)) {
35+
if (always_one_of(LHS, BEAM_TYPE_INTEGER) &&
36+
always_one_of(RHS, BEAM_TYPE_INTEGER) && is_small_result) {
3837
comment("skipped overflow test because the result is always small");
3938
emit_are_both_small(LHS, lhs_reg, RHS, rhs_reg, next);
4039
} else {

0 commit comments

Comments
 (0)