浏览代码

x86/x64: Limit VLOAD fusion to simple cases.

Reported by ccagml.
Mike Pall 3 年之前
父节点
当前提交
e1339aed3d
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/lj_asm_x86.h

+ 2 - 1
src/lj_asm_x86.h

@@ -485,7 +485,8 @@ static Reg asm_fuseload(ASMState *as, IRRef ref, RegSet allow)
 	asm_fusexref(as, ir->op1, xallow);
 	return RID_MRM;
       }
-    } else if (ir->o == IR_VLOAD && !(LJ_GC64 && irt_isaddr(ir->t))) {
+    } else if (ir->o == IR_VLOAD && IR(ir->op1)->o == IR_AREF &&
+	       !(LJ_GC64 && irt_isaddr(ir->t))) {
       asm_fuseahuref(as, ir->op1, xallow);
       as->mrm.ofs += 8 * ir->op2;
       return RID_MRM;