Skip to content

Commit d786bbb

Browse files
authored
Merge pull request #19056 from Akira1Saitoh/fixTransformIndexOfKnownString044
(0.44) Fix transformIndexOfKnownString to handle 8bit characters properly
2 parents 5dfc005 + bbace62 commit d786bbb

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

runtime/compiler/optimizer/J9ValuePropagation.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,7 @@ bool J9::ValuePropagation::transformIndexOfKnownString(
389389
else
390390
{
391391
uintptr_t element = TR::Compiler->om.getAddressOfElement(comp(), string, i + TR::Compiler->om.contiguousArrayHeaderSizeInBytes());
392-
uint8_t chByte = *((uint8_t*)element);
393-
ch = chByte;
392+
ch = *((uint8_t*)element);
394393
}
395394
}
396395
else
@@ -426,8 +425,7 @@ bool J9::ValuePropagation::transformIndexOfKnownString(
426425
else
427426
{
428427
uintptr_t element = TR::Compiler->om.getAddressOfElement(comp(), string, start + TR::Compiler->om.contiguousArrayHeaderSizeInBytes());
429-
int8_t chByte = *((uint8_t*)element);
430-
ch = chByte;
428+
ch = *((uint8_t*)element);
431429
}
432430
}
433431
else
@@ -464,8 +462,7 @@ bool J9::ValuePropagation::transformIndexOfKnownString(
464462
else
465463
{
466464
uintptr_t element = TR::Compiler->om.getAddressOfElement(comp(), string, i + TR::Compiler->om.contiguousArrayHeaderSizeInBytes());
467-
int8_t chByte = *((uint8_t*)element);
468-
ch = chByte;
465+
ch = *((uint8_t*)element);
469466
}
470467
}
471468
else

0 commit comments

Comments
 (0)