Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* @test
* @bug 8300258
* @key randomness
* @requires vm.opt.final.UseUnalignedAccesses == true
* @summary C2: vectorization fails on simple ByteBuffer loop
* @modules java.base/jdk.internal.misc
* @library /test/lib /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
/*
* @test
* @bug 8300256
* @requires vm.opt.final.UseUnalignedAccesses == true
* @modules java.base/jdk.internal.misc
* @library /test/lib /
* @run driver compiler.c2.irTests.TestVectorizationNotRun
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static void main(String[] args) {
IRNode.ADD_VI, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0",
IRNode.STORE_VECTOR, "> 0"},
applyIfPlatform = {"64-bit", "true"},
applyIf = {"AlignVector", "false"},
applyIfAnd = {"AlignVector", "false", "UseUnalignedAccesses", "true"},
applyIfCPUFeatureOr = {"avx", "true", "asimd", "true", "rvv", "true"})
public static void test() {
for (long i = 0; i < msA.byteSize() / 8L; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ void runTests() {
IRNode.ADD_VI, "> 0",
IRNode.STORE_VECTOR, "> 0",
"multiversion", "= 0"},
applyIf = {"UseUnalignedAccesses", "true"},
applyIfPlatform = {"64-bit", "true"},
applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true", "rvv", "true"},
phase = CompilePhase.PRINT_IDEAL)
Expand All @@ -246,7 +247,7 @@ static Object testAlwaysAligned(MemorySegment ms) {
IRNode.STORE_VECTOR, "> 0",
"multiversion_fast", "= 4", // pre, main, drain, post
"multiversion_slow", "= 2"}, // main, post
applyIf = {"AlignVector", "true"},
applyIfAnd = {"AlignVector", "true", "UseUnalignedAccesses", "true"},
applyIfPlatform = {"64-bit", "true"},
applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true", "rvv", "true"},
phase = CompilePhase.PRINT_IDEAL)
Expand Down Expand Up @@ -277,7 +278,7 @@ static Object testAlwaysUnaligned(MemorySegment ms) {
IRNode.STORE_VECTOR, "> 0",
"multiversion_fast", "= 4", // pre, main, drain, post
"multiversion_slow", "= 2"}, // main, post
applyIf = {"AlignVector", "true"},
applyIfAnd = {"AlignVector", "true", "UseUnalignedAccesses", "true"},
applyIfPlatform = {"64-bit", "true"},
applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true", "rvv", "true"},
phase = CompilePhase.PRINT_IDEAL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ public static void runArrayView() {
IRNode.LOAD_VECTOR_I, ">0",
IRNode.ADD_VI, ">0",
IRNode.STORE_VECTOR, ">0"},
applyIf = {"UseUnalignedAccesses", "true"},
applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true", "rvv", "true"})
public static void testArrayView(byte[] b_arr) {
for (int k = 0; k < b_arr.length; k += 4) {
Expand Down