Skip to content

Commit

Permalink
[GR-8807] Temporarily disable String.compareTo intrinsic on Java 8.
Browse files Browse the repository at this point in the history
PullRequest: graal/1171
  • Loading branch information
mur47x111 committed Mar 15, 2018
2 parents c9d3c65 + 90b3224 commit 2b3e212
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ private static void registerStringPlugins(InvocationPlugins plugins, AMD64 arch,
r.registerMethodSubstitution(AMD64StringSubstitutions.class, "indexOf", char[].class, int.class,
int.class, char[].class, int.class, int.class, int.class);
}
r.registerMethodSubstitution(AMD64StringSubstitutions.class, "compareTo", Receiver.class, String.class);
// r.registerMethodSubstitution(AMD64StringSubstitutions.class, "compareTo",
// Receiver.class, String.class);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.graalvm.compiler.replacements.nodes.ArrayCompareToNode;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Ignore;
import org.junit.Test;

import jdk.vm.ci.amd64.AMD64;
Expand All @@ -47,7 +48,16 @@ public class StringCompareToTest extends MethodSubstitutionTest {
"ABCDEFGH\uFF21\uFF21", "\uFF22", "\uFF21\uFF22", "\uFF21A",
"\uFF21\uFF21",
"\u043c\u0430\u043c\u0430\u0020\u043c\u044b\u043b\u0430\u0020\u0440\u0430\u043c\u0443\u002c\u0020\u0440\u0430\u043c\u0430\u0020\u0441\u044a\u0435\u043b\u0430\u0020\u043c\u0430\u043c\u0443",
"crazy dog jumps over laszy fox"
"crazy dog jumps over laszy fox",
"XMM-XMM-YMM-YMM-ZMM-ZMM-ZMM-ZMM-",
"XMM-XMM+YMM-YMM-ZMM-ZMM-ZMM-ZMM-",
"XMM-XMM-YMM-YMM+ZMM-ZMM-ZMM-ZMM-",
"XMM-XMM-YMM-YMM-ZMM-ZMM-ZMM-ZMM+",
"XMM-XMM-XMM-XMM-YMM-YMM-YMM-YMM-ZMM-ZMM-ZMM-ZMM-ZMM-ZMM-ZMM-ZMM-",
"XMM-XMM-XMM-XMM+YMM-YMM-YMM-YMM-ZMM-ZMM-ZMM-ZMM-ZMM-ZMM-ZMM-ZMM-",
"XMM-XMM-XMM-XMM-YMM-YMM-YMM-YMM+ZMM-ZMM-ZMM-ZMM-ZMM-ZMM-ZMM-ZMM-",
"XMM-XMM-XMM-XMM-YMM-YMM-YMM-YMM-ZMM-ZMM-ZMM-ZMM-ZMM-ZMM-ZMM-ZMM+",
""
};

public StringCompareToTest() {
Expand Down Expand Up @@ -81,17 +91,20 @@ public static int stringCompareTo(String a, String b) {
}

@Test
@Ignore("GR-8748")
public void testEqualString() {
String s = "equal-string";
executeStringCompareTo(s, new String(s.toCharArray()));
}

@Test
@Ignore("GR-8748")
public void testDifferentString() {
executeStringCompareTo("some-string", "different-string");
}

@Test
@Ignore("GR-8748")
public void testAllStrings() {
for (String s0 : testData) {
for (String s1 : testData) {
Expand Down

0 comments on commit 2b3e212

Please sign in to comment.