Skip to content

Commit 3da7e39

Browse files
author
Xin Liu
committed
8287840: Dead copy region node blocks IfNode's fold-compares
Reviewed-by: kvn, thartmann
1 parent c41a283 commit 3da7e39

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/hotspot/share/opto/node.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -1216,6 +1216,9 @@ bool Node::has_special_unique_user() const {
12161216
} else if (is_If() && (n->is_IfFalse() || n->is_IfTrue())) {
12171217
// See IfProjNode::Identity()
12181218
return true;
1219+
} else if ((is_IfFalse() || is_IfTrue()) && n->is_If()) {
1220+
// See IfNode::fold_compares
1221+
return true;
12191222
} else {
12201223
return false;
12211224
}

0 commit comments

Comments
 (0)