aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2010-03-14 17:10:47 +0100
committerMike Pall <mike>2010-03-14 17:10:47 +0100
commita25a717089679b629b6f028ede736a52f3c17ade (patch)
tree937f7a196ff52260481716c7c41617a99c9af08a /src
parent16f33422f14573d23522bc4e69cc6219e36f63e9 (diff)
downloadluajit-a25a717089679b629b6f028ede736a52f3c17ade.tar.gz
luajit-a25a717089679b629b6f028ede736a52f3c17ade.tar.bz2
luajit-a25a717089679b629b6f028ede736a52f3c17ade.zip
Fix folding of (comparison x x).
Diffstat (limited to 'src')
-rw-r--r--src/lj_opt_fold.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c
index 818979b8..a85b49bc 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -1020,7 +1020,7 @@ LJFOLDF(comm_comp)
1020{ 1020{
1021 /* For non-numbers only: x <=> x ==> drop; x <> x ==> fail */ 1021 /* For non-numbers only: x <=> x ==> drop; x <> x ==> fail */
1022 if (fins->op1 == fins->op2 && !irt_isnum(fins->t)) 1022 if (fins->op1 == fins->op2 && !irt_isnum(fins->t))
1023 return CONDFOLD(fins->o & 1); 1023 return CONDFOLD((fins->o ^ (fins->o >> 1)) & 1);
1024 if (fins->op1 < fins->op2) { /* Move lower ref to the right. */ 1024 if (fins->op1 < fins->op2) { /* Move lower ref to the right. */
1025 IRRef1 tmp = fins->op1; 1025 IRRef1 tmp = fins->op1;
1026 fins->op1 = fins->op2; 1026 fins->op1 = fins->op2;