Skip to content

Commit 9707496

Browse files
committed
8256479: [PPC64] C2 crashes when UseVectorByteReverseInstructionsPPC64 used without SuperwordUseVSX
Reviewed-by: goetz, psandoz
1 parent b0b9dd2 commit 9707496

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/hotspot/cpu/ppc/vm_version_ppc.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,13 @@ void VM_Version::initialize() {
136136
if (FLAG_IS_DEFAULT(UseCharacterCompareIntrinsics)) {
137137
FLAG_SET_ERGO(UseCharacterCompareIntrinsics, true);
138138
}
139-
if (FLAG_IS_DEFAULT(UseVectorByteReverseInstructionsPPC64)) {
140-
FLAG_SET_ERGO(UseVectorByteReverseInstructionsPPC64, true);
139+
if (SuperwordUseVSX) {
140+
if (FLAG_IS_DEFAULT(UseVectorByteReverseInstructionsPPC64)) {
141+
FLAG_SET_ERGO(UseVectorByteReverseInstructionsPPC64, true);
142+
}
143+
} else if (UseVectorByteReverseInstructionsPPC64) {
144+
warning("UseVectorByteReverseInstructionsPPC64 specified, but needs SuperwordUseVSX.");
145+
FLAG_SET_DEFAULT(UseVectorByteReverseInstructionsPPC64, false);
141146
}
142147
if (FLAG_IS_DEFAULT(UseBASE64Intrinsics)) {
143148
FLAG_SET_ERGO(UseBASE64Intrinsics, true);

test/jdk/jdk/incubator/vector/Vector64ConversionTests.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@
3939
* Vector64ConversionTests
4040
*/
4141

42+
/*
43+
* @test VectorConversionPPC64
44+
* @bug 8256479
45+
* @requires os.arch =="ppc64" | os.arch == "ppc64le"
46+
* @summary VectorConversion on PPC64 without Vector Register usage
47+
* @modules jdk.incubator.vector
48+
* @modules java.base/jdk.internal.vm.annotation
49+
* @run testng/othervm -XX:-SuperwordUseVSX -XX:-TieredCompilation --add-opens jdk.incubator.vector/jdk.incubator.vector=ALL-UNNAMED
50+
* Vector64ConversionTests
51+
*/
52+
4253
@Test
4354
public class Vector64ConversionTests extends AbstractVectorConversionTest {
4455

0 commit comments

Comments
 (0)