-
Enhancement
-
Resolution: Unresolved
-
P5
-
23
-
generic
-
generic
We currently have IfNode::merge_uncommon, which creates fused unstable ifs. However, it is guarded by conditions checking that the if's can be fused into a common range check. We should be able to merge uncommon traps as long as their if's do not have side effects in between.
An example of this is Integer::valueOf(). Currently, C2 may generate separate unstable_ifs for each of the `&&` conditions. We can have the second if branch to the uncommon trap of the dominating if.
We should not have to check for range checks of a single variable at all. The current merging only does it for patterns like `if (a < b && a < c)`. For example, we can generate a single fused if for `if (a < b && c < d)` since there are no side effects.
An example of this is Integer::valueOf(). Currently, C2 may generate separate unstable_ifs for each of the `&&` conditions. We can have the second if branch to the uncommon trap of the dominating if.
We should not have to check for range checks of a single variable at all. The current merging only does it for patterns like `if (a < b && a < c)`. For example, we can generate a single fused if for `if (a < b && c < d)` since there are no side effects.