[aarch64-port-dev ] RFR: 8156839 : aarch64: indexOf does not support CompactStrings

Andrew Haley aph at redhat.com
Mon May 16 12:53:40 UTC 2016

On 05/12/2016 03:30 PM, Edward Nevill wrote:
> AIUI you get a slow compare. I did the following test. In aarch64.ad I added UL and LU cases to the patterns without adding the corresponding support to the indexof routine in macroAssembler. Thus, if if matches these patterns it will get a guarantee failure. And indeed I get fatal errors from jtreg
> #  Internal Error (macroAssembler_aarch64.cpp:4157), pid=11424,tid=13130
> #  guarantee(ae == StrIntrinsicNode::LL || ae == StrIntrinsicNode::UU) failed: unhandled argument encoding
> There are not many of these. Only 1 in the whole of langtools. And it goes away if I remove the predicates allowing UL and LU.

With your patches I get jtreg fails:

Checking arrayEqualsB... Done.
Checking arrayEqualsC... Done.
Checking indexOfConstU... Done.
Checking indexOfConstLargeU... Done.
Checking indexOfConstEmptyU... o236	StrIndexOf	=== o235 o7 o253 o254  [[o216  86 ]]

--N: o236	StrIndexOf	=== o235 o7 o253 o254  [[o216  86 ]]

   --N: o253	Binary	=== _ o154 o160  [[o236 ]]
   _Binary_iRegP_R1_iRegI_R2  0  _Binary_iRegP_R1_iRegI_R2
   _Binary_iRegP_R3_iRegI_R4  0  _Binary_iRegP_R3_iRegI_R4
   _Binary_iRegP_R1_iRegI_R4  0  _Binary_iRegP_R1_iRegI_R4
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/matcher.cpp:1569
# A fatal error has been detected by the Java Runtime Environment:
#  Internal Error (/home/aph/hs/hotspot/src/share/vm/opto/matcher.cpp:1569), pid=13951, tid=14040
#  assert(false) failed: bad AD file
# JRE version: OpenJDK Runtime Environment (9.0) (slowdebug build 9-internal+0-2016-05-16-113151.aph.hs)
# Java VM: OpenJDK 64-Bit Server VM (slowdebug 9-internal+0-2016-05-16-113151.aph.hs, mixed mode, tiered, compressed oops, g1 gc, linux-aarch64)
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
# An error report file with more information is saved as:
# /home/aph/hs/hotspot/test/JTwork/scratch/hs_err_pid13951.log

(gdb) p ((StrIndexOfNode*)n)->encoding()
$4 = StrIntrinsicNode::UL

So yes, we do have to cope with all of the combinations.


More information about the hotspot-compiler-dev mailing list