8287840: Dead copy region node blocks IfNode's fold-compares

Reviewed-by: kvn, thartmann
This commit is contained in:
Xin Liu 2022-06-07 17:12:14 +00:00
parent c41a283f52
commit 3da7e393ee

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1216,6 +1216,9 @@ bool Node::has_special_unique_user() const {
} else if (is_If() && (n->is_IfFalse() || n->is_IfTrue())) {
// See IfProjNode::Identity()
return true;
} else if ((is_IfFalse() || is_IfTrue()) && n->is_If()) {
// See IfNode::fold_compares
return true;
} else {
return false;
}