Skip to content

Commit c9de8f1

Browse files
committed
Let getMaxLaneCount() report zero for now.
1 parent e6c2bb0 commit c9de8f1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_jdk_internal_vm_vector_VectorSupport.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,6 @@
2727
import com.oracle.svm.core.annotate.Delete;
2828
import com.oracle.svm.core.annotate.Substitute;
2929
import com.oracle.svm.core.annotate.TargetClass;
30-
import com.oracle.svm.core.util.VMError;
3130

3231
@TargetClass(className = "jdk.internal.vm.vector.VectorSupport")
3332
public final class Target_jdk_internal_vm_vector_VectorSupport {
@@ -37,6 +36,10 @@ public final class Target_jdk_internal_vm_vector_VectorSupport {
3736
@SuppressWarnings("unused")
3837
@Substitute
3938
public static int getMaxLaneCount(Class<?> etype) {
40-
throw VMError.unsupportedFeature("VectorSupport.getMaxLaneCount not supported.");
39+
/*
40+
* GR-51303: The Vector API is not yet optimized by the Graal compiler. But instead of
41+
* letting applications fail, always return a max lane count of zero for now.
42+
*/
43+
return 0;
4144
}
4245
}

0 commit comments

Comments
 (0)