Skip to content

Commit

Permalink
[GR-49607] Fix insertion of less specific PiNodes during GraphEffects…
Browse files Browse the repository at this point in the history
…#replaceAtUsages.

PullRequest: graal/15915
  • Loading branch information
rmosaner committed Oct 27, 2023
2 parents fd83528 + b96db07 commit 363e4c0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public void apply(StructuredGraph graph, ArrayList<Node> obsoleteNodes) {
* the pi will be used to improve the stamp information of the read. Such a read
* might later be replaced with a read with a less precise stamp.
*/
if (node.hasUsages() && !node.stamp(NodeView.DEFAULT).equals(replacementNode.stamp(NodeView.DEFAULT))) {
if (node.hasUsages() && (replacementNode.stamp(NodeView.DEFAULT).tryImproveWith(node.stamp(NodeView.DEFAULT)) != null)) {
replacementNode = graph.unique(new PiNode(replacementNode, node.stamp(NodeView.DEFAULT)));
}
node.replaceAtUsages(replacementNode);
Expand Down

0 comments on commit 363e4c0

Please sign in to comment.