aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lj_opt_fold.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c
index 91e9655a..20b88e25 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -2293,14 +2293,16 @@ TRef LJ_FASTCALL lj_opt_fold(jit_State *J)
2293 if (!(J->flags & JIT_F_OPT_FOLD) && irm_kind(lj_ir_mode[fins->o]) == IRM_N) 2293 if (!(J->flags & JIT_F_OPT_FOLD) && irm_kind(lj_ir_mode[fins->o]) == IRM_N)
2294 return lj_opt_cse(J); 2294 return lj_opt_cse(J);
2295 2295
2296 /* Forwarding or CSE disabled? Emit raw IR for loads, except for SLOAD. */ 2296 /* No FOLD, forwarding or CSE? Emit raw IR for loads, except for SLOAD. */
2297 if ((J->flags & (JIT_F_OPT_FWD|JIT_F_OPT_CSE)) != 2297 if ((J->flags & (JIT_F_OPT_FOLD|JIT_F_OPT_FWD|JIT_F_OPT_CSE)) !=
2298 (JIT_F_OPT_FWD|JIT_F_OPT_CSE) && 2298 (JIT_F_OPT_FOLD|JIT_F_OPT_FWD|JIT_F_OPT_CSE) &&
2299 irm_kind(lj_ir_mode[fins->o]) == IRM_L && fins->o != IR_SLOAD) 2299 irm_kind(lj_ir_mode[fins->o]) == IRM_L && fins->o != IR_SLOAD)
2300 return lj_ir_emit(J); 2300 return lj_ir_emit(J);
2301 2301
2302 /* DSE disabled? Emit raw IR for stores. */ 2302 /* No FOLD or DSE? Emit raw IR for stores. */
2303 if (!(J->flags & JIT_F_OPT_DSE) && irm_kind(lj_ir_mode[fins->o]) == IRM_S) 2303 if ((J->flags & (JIT_F_OPT_FOLD|JIT_F_OPT_DSE)) !=
2304 (JIT_F_OPT_FOLD|JIT_F_OPT_DSE) &&
2305 irm_kind(lj_ir_mode[fins->o]) == IRM_S)
2304 return lj_ir_emit(J); 2306 return lj_ir_emit(J);
2305 } 2307 }
2306 2308