From 90b32248d004cac9c05fd4dc380d89df8ece81ad Mon Sep 17 00:00:00 2001 From: Yudi Zheng Date: Wed, 14 Mar 2018 23:53:20 +0100 Subject: [PATCH] [GR-8807] Temporarily disable String.compareTo intrinsic on Java 8. --- .../amd64/AMD64GraphBuilderPlugins.java | 3 ++- .../replacements/test/StringCompareToTest.java | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/compiler/src/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java b/compiler/src/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java index 038ff0de56c2..c2cb77fbee90 100644 --- a/compiler/src/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java +++ b/compiler/src/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java @@ -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); } } diff --git a/compiler/src/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringCompareToTest.java b/compiler/src/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringCompareToTest.java index 5e677b6be8d1..53f0901c718f 100644 --- a/compiler/src/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringCompareToTest.java +++ b/compiler/src/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringCompareToTest.java @@ -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; @@ -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() { @@ -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) {