mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix 64 bit case of (SUB x x) and (BXOR x x) FOLD rules.
This commit is contained in:
parent
07d8a53b39
commit
6fee0002b9
@ -1019,7 +1019,7 @@ LJFOLD(SUBOV any any)
|
|||||||
LJFOLDF(simplify_intsub)
|
LJFOLDF(simplify_intsub)
|
||||||
{
|
{
|
||||||
if (fins->op1 == fins->op2 && !irt_isnum(fins->t)) /* i - i ==> 0 */
|
if (fins->op1 == fins->op2 && !irt_isnum(fins->t)) /* i - i ==> 0 */
|
||||||
return INTFOLD(0);
|
return irt_is64(fins->t) ? INT64FOLD(0) : INTFOLD(0);
|
||||||
return NEXTFOLD;
|
return NEXTFOLD;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1492,7 +1492,7 @@ LJFOLD(BXOR any any)
|
|||||||
LJFOLDF(comm_bxor)
|
LJFOLDF(comm_bxor)
|
||||||
{
|
{
|
||||||
if (fins->op1 == fins->op2) /* i xor i ==> 0 */
|
if (fins->op1 == fins->op2) /* i xor i ==> 0 */
|
||||||
return INTFOLD(0);
|
return irt_is64(fins->t) ? INT64FOLD(0) : INTFOLD(0);
|
||||||
return fold_comm_swap(J);
|
return fold_comm_swap(J);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user