Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorng committed Jul 19, 2023
1 parent 3065f69 commit 56226c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion erts/emulator/beam/jit/arm/instr_arith.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,11 @@ void BeamModuleAssembler::emit_i_mul_add(const ArgLabel &Fail,
const ArgRegister &Dst) {
bool is_product_small = is_product_small_if_args_are_small(Src1, Src2);
bool is_sum_small = is_sum_small_if_args_are_small(Src3, Src4);
bool is_increment_zero = Src4.isSmall() && Src4.as<ArgSmall>().getSigned() == 0;

if (is_increment_zero) {
comment("(adding zero)");
}

if (always_small(Src1) && always_small(Src2) && always_small(Src4) &&
is_product_small && is_sum_small) {
Expand Down Expand Up @@ -560,7 +565,6 @@ void BeamModuleAssembler::emit_i_mul_add(const ArgLabel &Fail,
Label small = a.newLabel();
Label store_result = a.newLabel();
auto [src1, src2] = load_sources(Src1, ARG2, Src2, ARG3);
bool is_increment_zero = Src4.isSmall() && Src4.as<ArgSmall>().getSigned() == 0;
bool is_increment_arm_literal = Src4.isSmall() &&
Support::isUInt12(Src4.as<ArgSmall>().get());
auto src4 = load_source(ArgXRegister(0), XREG0);
Expand Down

0 comments on commit 56226c9

Please sign in to comment.