[aarch64-port-dev ] RFR: 8156839 : aarch64: indexOf does not support CompactStrings
edward.nevill at gmail.com
Thu May 12 14:30:13 UTC 2016
On Thu, 2016-05-12 at 14:52 +0100, Andrew Haley wrote:
> On 05/12/2016 02:43 PM, Edward Nevill wrote:
> > Please review the following webrev which adds support for
> > CompactStrings to the indexOf intrinsic.
> > http://cr.openjdk.java.net/~enevill/8156839/webrev.01
> Looks reasonable.
> > This adds support for the UU and LL encodings. Do we also need
> > support for LU and UL?
> I'm not sure. What happens if you try to compare a latin1 and a UTF16
> string? Do we get compilation failures, or just a slow compare?
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.
> > Also, I notice that StrComp doesn't seem to have support for
> > CompactString either. Shall I do that also?
> > Tested with jtreg hotspot and langtools.
> OK. But note well: hotspot/hs is frozen for the JDK9 release.
OK. I will do StrComp as a separate webrev.
Is hs-comp frozen as well?
I also notice there is StrIndexOfChar which isn't implemented on aarch64.
This should be simple because the code is already there as a special case of StrIndexOf.
All the best,
More information about the hotspot-compiler-dev