In the description of Node::Ideal, we have:
"If ANY change is made, it must return the root of the reshaped graph - even if the root is the same Node"
It is crucial that such changes do not go unnoticed and that they can propagate to other nodes. We should enforce this property by checking that the node hash is still the same if Ideal() returned nullptr. This verification should probably be enabled with -XX:VerifyIterativeGVN=1.
This would also make regression testing of bugs caused by wrongly returning nullptr in Ideal() easier, such as JDK-8373251
"If ANY change is made, it must return the root of the reshaped graph - even if the root is the same Node"
It is crucial that such changes do not go unnoticed and that they can propagate to other nodes. We should enforce this property by checking that the node hash is still the same if Ideal() returned nullptr. This verification should probably be enabled with -XX:VerifyIterativeGVN=1.
This would also make regression testing of bugs caused by wrongly returning nullptr in Ideal() easier, such as JDK-8373251
- relates to
-
JDK-8373251 C2: Ideal() returns nullptr for shift nodes after having modified the shift amount input
-
- In Progress
-