From aad339a179318e2f78920282f1565a8a1ea501f3 Mon Sep 17 00:00:00 2001 From: eapen Date: Fri, 21 May 2021 11:55:29 +0800 Subject: [PATCH] I3SCCW: incorrect patch modification cause jtreg test fail - The problem was introduced by updating baseline to 8u292 - Change the log time --- ...89067-move-the-store-out-of-the-loop.patch | 10 ++-- 8182036.patch | 48 +++++++++---------- java-1.8.0-openjdk.spec | 2 +- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/8080289-8040213-8189067-move-the-store-out-of-the-loop.patch b/8080289-8040213-8189067-move-the-store-out-of-the-loop.patch index 70b841b..e750541 100644 --- a/8080289-8040213-8189067-move-the-store-out-of-the-loop.patch +++ b/8080289-8040213-8189067-move-the-store-out-of-the-loop.patch @@ -9,10 +9,10 @@ Bug url: https://bugs.openjdk.java.net/browse/JDK-8080289 https://bugs.openjdk.j hotspot/src/share/vm/opto/loopnode.cpp | 2 +- hotspot/src/share/vm/opto/loopnode.hpp | 4 +- hotspot/src/share/vm/opto/loopopts.cpp | 191 +++++++++++ - hotspot/src/share/vm/opto/memnode.cpp | 58 ++-- + hotspot/src/share/vm/opto/memnode.cpp | 60 ++-- hotspot/src/share/vm/opto/phaseX.hpp | 9 +- .../loopopts/TestMoveStoresOutOfLoops.java | 310 ++++++++++++++++++ - 6 files changed, 545 insertions(+), 29 deletions(-) + 6 files changed, 547 insertions(+), 29 deletions(-) create mode 100644 hotspot/test/compiler/loopopts/TestMoveStoresOutOfLoops.java diff --git a/hotspot/src/share/vm/opto/loopnode.cpp b/hotspot/src/share/vm/opto/loopnode.cpp @@ -270,7 +270,7 @@ diff --git a/hotspot/src/share/vm/opto/memnode.cpp b/hotspot/src/share/vm/opto/m index 3ecbe1ce0..1bab75927 100644 --- a/hotspot/src/share/vm/opto/memnode.cpp +++ b/hotspot/src/share/vm/opto/memnode.cpp -@@ -2313,33 +2313,39 @@ Node *StoreNode::Ideal(PhaseGVN *phase, bool can_reshape) { +@@ -2313,33 +2313,41 @@ Node *StoreNode::Ideal(PhaseGVN *phase, bool can_reshape) { // unsafe if I have intervening uses... Also disallowed for StoreCM // since they must follow each StoreP operation. Redundant StoreCMs // are eliminated just before matching in final_graph_reshape. @@ -315,7 +315,9 @@ index 3ecbe1ce0..1bab75927 100644 + st->Opcode() == Op_StoreVector || + Opcode() == Op_StoreVector || + phase->C->get_alias_index(adr_type()) == Compile::AliasIdxRaw || -+ (Opcode() == Op_StoreL && st->Opcode() == Op_StoreI), // expanded ClearArrayNode ++ (Opcode() == Op_StoreL && st->Opcode() == Op_StoreI) || // expanded ClearArrayNode ++ (Opcode() == Op_StoreI && st->Opcode() == Op_StoreL) || // initialization by arraycopy ++ (is_mismatched_access() || mem->as_Store()->is_mismatched_access()), + err_msg_res("no mismatched stores, except on raw memory: %s %s", NodeClassNames[Opcode()], NodeClassNames[st->Opcode()])); + + if (st->in(MemNode::Address)->eqv_uncast(address) && diff --git a/8182036.patch b/8182036.patch index e5756ae..cb2dcf5 100644 --- a/8182036.patch +++ b/8182036.patch @@ -1,32 +1,28 @@ -From ad7ec63def37ef080e98394f7ea76acb28e4574c Mon Sep 17 00:00:00 2001 -From: zhangyipeng -Date: Tue, 9 Mar 2021 17:24:33 +0800 -Subject: [PATCH] [Backport]8182036: 2-Load from initializing arraycopy - uses wrong memory state +From bc0b4ef15436f98b4e7fc87342320b5b4f10ef3c Mon Sep 17 00:00:00 2001 +Date: Fri, 22 Jan 2021 14:30:40 +0800 +Subject: Backport of JDK-8182036 -Reference: https://bugs.openjdk.java.net/browse/JDK-8182036, https://bugs.openjdk.java.net/browse/JDK-8233023 - - -Signed-off-by: He Xuejin +summary: Load from initializing arraycopy uses wrong memory state +LLT: +Bug url: https://bugs.openjdk.java.net/browse/JDK-8182036 --- - hotspot/src/share/vm/opto/memnode.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + hotspot/src/share/vm/opto/library_call.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/hotspot/src/share/vm/opto/memnode.cpp b/hotspot/src/share/vm/opto/memnode.cpp -index 317c21d2d..4a8fb1074 100644 ---- a/hotspot/src/share/vm/opto/memnode.cpp -+++ b/hotspot/src/share/vm/opto/memnode.cpp -@@ -2329,7 +2329,9 @@ Node *StoreNode::Ideal(PhaseGVN *phase, bool can_reshape) { - st->Opcode() == Op_StoreVector || - Opcode() == Op_StoreVector || - phase->C->get_alias_index(adr_type()) == Compile::AliasIdxRaw || -- (Opcode() == Op_StoreL && st->Opcode() == Op_StoreI), // expanded ClearArrayNode -+ (Opcode() == Op_StoreL && st->Opcode() == Op_StoreI) || // expanded ClearArrayNode -+ (Opcode() == Op_StoreI && st->Opcode() == Op_StoreL) || // initialization by arraycopy -+ (is_mismatched_access() || mem->as_Store()->is_mismatched_access()), - err_msg_res("no mismatched stores, except on raw memory: %s %s", NodeClassNames[Opcode()], NodeClassNames[st->Opcode()])); - - if (st->in(MemNode::Address)->eqv_uncast(address) && +diff --git a/hotspot/src/share/vm/opto/library_call.cpp b/hotspot/src/share/vm/opto/library_call.cpp +index cd1b1e5c0..89ebabe6f 100644 +--- a/hotspot/src/share/vm/opto/library_call.cpp ++++ b/hotspot/src/share/vm/opto/library_call.cpp +@@ -5703,7 +5703,8 @@ LibraryCallKit::generate_block_arraycopy(const TypePtr* adr_type, + ((src_off ^ dest_off) & (BytesPerLong-1)) == 0) { + Node* sptr = basic_plus_adr(src, src_off); + Node* dptr = basic_plus_adr(dest, dest_off); +- Node* sval = make_load(control(), sptr, TypeInt::INT, T_INT, adr_type, MemNode::unordered); ++ const TypePtr* s_adr_type = _gvn.type(sptr)->is_ptr(); ++ Node* sval = make_load(control(), sptr, TypeInt::INT, T_INT, s_adr_type, MemNode::unordered); + store_to_memory(control(), dptr, sval, T_INT, adr_type, MemNode::unordered); + src_off += BytesPerInt; + dest_off += BytesPerInt; -- 2.19.0 diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index f9da316..6d2ce7e 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -2166,7 +2166,7 @@ require "copy_jdk_configs.lua" %endif %changelog -* Tue Apr 20 2021 eapen - 1:1.8.0.292-b10.0 +* Tue May 18 2021 eapen - 1:1.8.0.292-b10.0 - update to jdk8u292-b10 - split sync-patch to multi patches -- Gitee