Prevent CSE of a REF_BASE operand across IR_RETF.

Reported by XmiliaH.
master
Mike Pall 2021-12-19 18:35:27 +01:00
parent 7b994e0ee0
commit e73916d811
1 changed files with 11 additions and 0 deletions

View File

@ -2096,6 +2096,17 @@ LJFOLDF(xload_kptr)
LJFOLD(XLOAD any any)
LJFOLDX(lj_opt_fwd_xload)
/* -- Frame handling ------------------------------------------------------ */
/* Prevent CSE of a REF_BASE operand across IR_RETF. */
LJFOLD(SUB any BASE)
LJFOLD(SUB BASE any)
LJFOLD(EQ any BASE)
LJFOLDF(fold_base)
{
return lj_opt_cselim(J, J->chain[IR_RETF]);
}
/* -- Write barriers ------------------------------------------------------ */
/* Write barriers are amenable to CSE, but not across any incremental