RETF modifies BASE. Treat it like a store or it gets CSEd.

This commit is contained in:
Mike Pall 2010-02-04 21:33:24 +01:00
parent 5d2690c608
commit 370c868c31
2 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,7 @@
_(NE, GC, ref, ref) \
\
_(ABC, G , ref, ref) \
_(RETF, G , ref, ref) \
_(RETF, SG, ref, ref) \
\
_(LT, G , ref, ref) \
_(GE, G , ref, ref) \
@ -288,6 +288,7 @@ typedef enum {
#define IRM_GC (IRM_G|IRM_C)
#define IRM_RG (IRM_R|IRM_G)
#define IRM_LG (IRM_L|IRM_G)
#define IRM_SG (IRM_S|IRM_G)
#define irm_op1(m) (cast(IRMode, (m)&3))
#define irm_op2(m) (cast(IRMode, ((m)>>2)&3))

View File

@ -1326,6 +1326,7 @@ LJFOLDX(lj_opt_dse_fstore)
LJFOLD(NEWREF any any) /* Treated like a store. */
LJFOLD(CALLS any any)
LJFOLD(CALLL any any) /* Safeguard fallback. */
LJFOLD(RETF any any) /* Modifies BASE. */
LJFOLD(TNEW any any)
LJFOLD(TDUP any)
LJFOLDX(lj_ir_emit)