From 45c88b7963de2969a9a656c03ba06ad995d7fd5f Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 12 Nov 2023 15:41:52 +0100 Subject: [PATCH] x86/x64: Don't fuse loads across table.clear. Reported by Peter Cawley. #1117 --- src/lj_asm_x86.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h index d98fb827..a105b439 100644 --- a/src/lj_asm_x86.h +++ b/src/lj_asm_x86.h @@ -473,6 +473,7 @@ static Reg asm_fuseload(ASMState *as, IRRef ref, RegSet allow) } } else if (ir->o == IR_ALOAD || ir->o == IR_HLOAD || ir->o == IR_ULOAD) { if (noconflict(as, ref, ir->o + IRDELTA_L2S, 0) && + noconflict(as, ref, IR_CALLS, 0) && /* Don't cross table.clear. */ !(LJ_GC64 && irt_isaddr(ir->t))) { asm_fuseahuref(as, ir->op1, xallow); return RID_MRM;