RFR(S): 8243670: Unexpected test result caused by C2 MergeMemNode::Ideal
Roland Westrelin
rwestrel at redhat.com
Tue Jun 23 08:57:39 UTC 2020
> # 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.
Roland.
More information about the hotspot-compiler-dev
mailing list