aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lj_opt_fold.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c
index 73a368ed..5f4b8810 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -998,8 +998,10 @@ LJFOLDF(simplify_nummuldiv_k)
998 if (n == 1.0) { /* x o 1 ==> x */ 998 if (n == 1.0) { /* x o 1 ==> x */
999 return LEFTFOLD; 999 return LEFTFOLD;
1000 } else if (n == -1.0) { /* x o -1 ==> -x */ 1000 } else if (n == -1.0) { /* x o -1 ==> -x */
1001 IRRef op1 = fins->op1;
1002 fins->op2 = (IRRef1)lj_ir_ksimd(J, LJ_KSIMD_NEG); /* Modifies fins. */
1003 fins->op1 = op1;
1001 fins->o = IR_NEG; 1004 fins->o = IR_NEG;
1002 fins->op2 = (IRRef1)lj_ir_ksimd(J, LJ_KSIMD_NEG);
1003 return RETRYFOLD; 1005 return RETRYFOLD;
1004 } else if (fins->o == IR_MUL && n == 2.0) { /* x * 2 ==> x + x */ 1006 } else if (fins->o == IR_MUL && n == 2.0) { /* x * 2 ==> x + x */
1005 fins->o = IR_ADD; 1007 fins->o = IR_ADD;