diff options
author | Mike Pall <mike> | 2022-12-07 18:38:22 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2022-12-07 18:38:22 +0100 |
commit | de2e1ca9d3d87e74c0c20c1e4ad3c32b31a5875b (patch) | |
tree | c6dd3a9575b77c9f019c9d8627a814a955227acf /src/lj_asm_arm64.h | |
parent | 7d5d4a1b1a690d9fc87253868ba967bf25f4df6e (diff) | |
download | luajit-de2e1ca9d3d87e74c0c20c1e4ad3c32b31a5875b.tar.gz luajit-de2e1ca9d3d87e74c0c20c1e4ad3c32b31a5875b.tar.bz2 luajit-de2e1ca9d3d87e74c0c20c1e4ad3c32b31a5875b.zip |
Disable FMA by default. Use -Ofma or jit.opt.start("+fma") to enable.
See the discussion in #918 for the rationale.
Diffstat (limited to 'src/lj_asm_arm64.h')
-rw-r--r-- | src/lj_asm_arm64.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h index 4e34b3be..805ea54b 100644 --- a/src/lj_asm_arm64.h +++ b/src/lj_asm_arm64.h | |||
@@ -337,7 +337,8 @@ static int asm_fusemadd(ASMState *as, IRIns *ir, A64Ins ai, A64Ins air) | |||
337 | { | 337 | { |
338 | IRRef lref = ir->op1, rref = ir->op2; | 338 | IRRef lref = ir->op1, rref = ir->op2; |
339 | IRIns *irm; | 339 | IRIns *irm; |
340 | if (lref != rref && | 340 | if ((as->flags & JIT_F_OPT_FMA) && |
341 | lref != rref && | ||
341 | ((mayfuse(as, lref) && (irm = IR(lref), irm->o == IR_MUL) && | 342 | ((mayfuse(as, lref) && (irm = IR(lref), irm->o == IR_MUL) && |
342 | ra_noreg(irm->r)) || | 343 | ra_noreg(irm->r)) || |
343 | (mayfuse(as, rref) && (irm = IR(rref), irm->o == IR_MUL) && | 344 | (mayfuse(as, rref) && (irm = IR(rref), irm->o == IR_MUL) && |