RFR(S): 8243670: Unexpected test result caused by C2 MergeMemNode::Ideal
Yangfei (Felix)
felix.yang at huawei.com
Wed Jun 24 03:24:22 UTC 2020
Hi,
> -----Original Message-----
> From: Roland Westrelin [mailto:rwestrel at redhat.com]
> Sent: Tuesday, June 23, 2020 4:58 PM
> To: Yangfei (Felix) <felix.yang at huawei.com>; Tobias Hartmann
> <tobias.hartmann at oracle.com>; hotspot-compiler-dev at openjdk.java.net
> Cc: guoge (A) <guoge1 at huawei.com>; zhouyong (V)
> <zhouyong44 at huawei.com>
> Subject: RE: RFR(S): 8243670: Unexpected test result caused by C2
> MergeMemNode::Ideal
>
>
> > # A fatal error has been detected by the Java Runtime Environment:
> > #
> > # Internal Error
> > (/home/yangfei/openjdk-jdk/src/hotspot/share/opto/phaseX.cpp:1135),
> > pid=10598, tid=10613 # assert(false) failed: infinite loop in
> > PhaseIterGVN::optimize
>
> For known instances, MemNode::optimize_memory_chain() clones the
> bottom phi into a new phi that your patch then clones to create a bottom phi.
>
> diff --git a/src/hotspot/share/opto/cfgnode.cpp
> b/src/hotspot/share/opto/cfgnode.cpp
> --- a/src/hotspot/share/opto/cfgnode.cpp
> +++ b/src/hotspot/share/opto/cfgnode.cpp
> @@ -1337,7 +1337,7 @@
>
> // Looking for phis with identical inputs. If we find one that has
> // type TypePtr::BOTTOM, replace the current phi with the bottom phi.
> - if (phase->is_IterGVN() && type() == Type::MEMORY && adr_type() !=
> TypePtr::BOTTOM) {
> + if (phase->is_IterGVN() && type() == Type::MEMORY && adr_type() !=
> + TypePtr::BOTTOM && !adr_type()->is_known_instance()) {
> uint phi_len = req();
> Node* phi_reg = region();
> for (DUIterator_Fast imax, i = phi_reg->fast_outs(imax); i < imax; i++) {
>
> fixes it.
Thanks, Roland.
I updated accordingly, new webrev: http://cr.openjdk.java.net/~fyang/8243670/webrev.02
Tier1-3 tested with fastdebug builds both on x86_64-linux-gnu and aarch64-linux-gnu.
Newly added test fail without the fix and pass otherwise.
Also committed to the submit repo and test results looks good:
Job: mach5-one-fyang-JDK-8243670-2-20200623-1609-12020284
BuildId: 2020-06-23-1608238.felix.yang.source
No failed tests
Tasks Summary
• EXECUTED_WITH_FAILURE: 0
• KILLED: 0
• HARNESS_ERROR: 0
• PASSED: 103
• UNABLE_TO_RUN: 0
• NOTHING_TO_RUN: 0
• FAILED: 0
• NA: 0
Shall I do the push?
Felix
More information about the hotspot-compiler-dev
mailing list