RFR: 8152554: CompactStrings broken on AArch64

Andrew Haley aph at redhat.com
Mon Apr 11 12:18:25 UTC 2016


The way that we implemented CompactStrings on AArch64 was wrong.

The simple technique of disabling the intrinsics when selecting
patterns like with a predicate:

  predicate(!CompactStrings);

does not work: all it does is lead to selection failures.  Instead, we
need to be smart about generating the intrinsics, like this:

 const bool Matcher::match_rule_supported(int opcode) {

-  // TODO
-  // identify extra cases that we might want to provide match rules for
-  // e.g. Op_StrEquals and other intrinsics
+  switch (opcode) {
+  case Op_StrComp:
+  case Op_StrIndexOf:
+    if (CompactStrings)  return false;
+    break;
+  default:
+    break;
+  }
+
   if (!has_match_rule(opcode)) {
     return false;
   }

This webrev makes CompactStrings works, but doesn't have all the
accelerated intrinsics yet.

http://cr.openjdk.java.net/~aph/8152554/

OK?

Andrew.


More information about the hotspot-dev mailing list