mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 07:04:08 +00:00
Limit CSE for IR_CARG to fix loop optimizations.
Thanks to Peter Cawley. #1244
This commit is contained in:
parent
7a608e4425
commit
3bdc6498c4
@ -2171,6 +2171,17 @@ LJFOLD(CNEW any any)
|
||||
LJFOLD(XSNEW any any)
|
||||
LJFOLDX(lj_ir_emit)
|
||||
|
||||
/* -- Miscellaneous ------------------------------------------------------- */
|
||||
|
||||
LJFOLD(CARG any any)
|
||||
LJFOLDF(cse_carg)
|
||||
{
|
||||
TRef tr = lj_opt_cse(J);
|
||||
if (tref_ref(tr) < J->chain[IR_LOOP]) /* CSE across loop? */
|
||||
return EMITFOLD; /* Raw emit. Assumes fins is left intact by CSE. */
|
||||
return tr;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/* Every entry in the generated hash table is a 32 bit pattern:
|
||||
|
Loading…
Reference in New Issue
Block a user