8224062: Improve String index handling
authorthartmann
Mon, 27 May 2019 01:36:04 -0700
changeset 58625 9b54aee889b4
parent 58624 26867ad686e9
child 58626 a9ed3d93cca3
8224062: Improve String index handling Reviewed-by: kvn, rhalade, mschoene
src/hotspot/cpu/x86/macroAssembler_x86.cpp
--- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp	Fri May 24 16:53:44 2019 +0200
+++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp	Mon May 27 01:36:04 2019 -0700
@@ -6350,7 +6350,7 @@
   movptr(result, str1);
   if (UseAVX >= 2) {
     cmpl(cnt1, stride);
-    jcc(Assembler::less, SCAN_TO_CHAR_LOOP);
+    jcc(Assembler::less, SCAN_TO_CHAR);
     cmpl(cnt1, 2*stride);
     jcc(Assembler::less, SCAN_TO_8_CHAR_INIT);
     movdl(vec1, ch);
@@ -6377,10 +6377,8 @@
   }
   bind(SCAN_TO_8_CHAR);
   cmpl(cnt1, stride);
-  if (UseAVX >= 2) {
-    jcc(Assembler::less, SCAN_TO_CHAR);
-  } else {
-    jcc(Assembler::less, SCAN_TO_CHAR_LOOP);
+  jcc(Assembler::less, SCAN_TO_CHAR);
+  if (UseAVX < 2) {
     movdl(vec1, ch);
     pshuflw(vec1, vec1, 0x00);
     pshufd(vec1, vec1, 0);