Description
C2 merges the branches that trap for an If and the dominating If into a single region that branches to the uncommon trap for the dominating If. The problem is that if the dominating If branches to an uncommon trap with 'Reason_unloaded', the merged uncommon trap will not re-execute the checks but directly execute the branch of the first If. This leads to wrong code being executed. Since we don't know which of the two checks failed, we have to re-execute both.
Attachments
Issue Links
- relates to
-
JDK-8073480 C2 should optimize explicit range checks
- Resolved
-
JDK-8142500 missing null checks in IfNode::has_only_uncommon_traps
- Resolved
-
JDK-8147876 ciTypeFlow::is_dominated_by() writes outside dominated array
- Closed