Fixed a corner case of range optimization in JIT.
This commit is contained in:
parent
69af3b39a6
commit
e40bc47ae2
|
@ -160,6 +160,8 @@ III).
|
||||||
44. Fix bug in RunTest.bat for new test 14, and adjust the script for the added
|
44. Fix bug in RunTest.bat for new test 14, and adjust the script for the added
|
||||||
test (there are now 20 in total).
|
test (there are now 20 in total).
|
||||||
|
|
||||||
|
45. Fixed a corner case of range optimization in JIT.
|
||||||
|
|
||||||
|
|
||||||
Version 10.20 30-June-2015
|
Version 10.20 30-June-2015
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
|
@ -4997,8 +4997,10 @@ switch(length)
|
||||||
case 4:
|
case 4:
|
||||||
if ((ranges[1] - ranges[0]) == (ranges[3] - ranges[2])
|
if ((ranges[1] - ranges[0]) == (ranges[3] - ranges[2])
|
||||||
&& (ranges[0] | (ranges[2] - ranges[0])) == ranges[2]
|
&& (ranges[0] | (ranges[2] - ranges[0])) == ranges[2]
|
||||||
|
&& (ranges[1] & (ranges[2] - ranges[0])) == 0
|
||||||
&& is_powerof2(ranges[2] - ranges[0]))
|
&& is_powerof2(ranges[2] - ranges[0]))
|
||||||
{
|
{
|
||||||
|
SLJIT_ASSERT((ranges[0] & (ranges[2] - ranges[0])) == 0 && (ranges[2] & ranges[3] & (ranges[2] - ranges[0])) != 0);
|
||||||
OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[2] - ranges[0]);
|
OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[2] - ranges[0]);
|
||||||
if (ranges[2] + 1 != ranges[3])
|
if (ranges[2] + 1 != ranges[3])
|
||||||
{
|
{
|
||||||
|
|
|
@ -188,6 +188,7 @@ static struct regression_test_case regression_test_cases[] = {
|
||||||
{ CMUP, A, 0, 0, "\xf0\x90\x90\x80{2}", "\xf0\x90\x90\x80#\xf0\x90\x90\xa8\xf0\x90\x90\x80" },
|
{ CMUP, A, 0, 0, "\xf0\x90\x90\x80{2}", "\xf0\x90\x90\x80#\xf0\x90\x90\xa8\xf0\x90\x90\x80" },
|
||||||
{ CMUP, A, 0, 0, "\xf0\x90\x90\xa8{2}", "\xf0\x90\x90\x80#\xf0\x90\x90\xa8\xf0\x90\x90\x80" },
|
{ CMUP, A, 0, 0, "\xf0\x90\x90\xa8{2}", "\xf0\x90\x90\x80#\xf0\x90\x90\xa8\xf0\x90\x90\x80" },
|
||||||
{ CMUP, A, 0, 0, "\xe1\xbd\xb8\xe1\xbf\xb8", "\xe1\xbf\xb8\xe1\xbd\xb8" },
|
{ CMUP, A, 0, 0, "\xe1\xbd\xb8\xe1\xbf\xb8", "\xe1\xbf\xb8\xe1\xbd\xb8" },
|
||||||
|
{ M, A, 0, 0, "[3-57-9]", "5" },
|
||||||
|
|
||||||
/* Assertions. */
|
/* Assertions. */
|
||||||
{ MU, A, 0, 0, "\\b[^A]", "A_B#" },
|
{ MU, A, 0, 0, "\\b[^A]", "A_B#" },
|
||||||
|
|
Loading…
Reference in New Issue