RFR: 8304049: C2 can not merge trivial Ifs due to CastII
Yi Yang
yyang at openjdk.org
Wed Mar 15 10:45:08 UTC 2023
Hi can I have a review for this patch? C2 can not apply Split If for the attached trivial case. PhiNode::Ideal removes itself by unique_input but introduces a new CastII, therefore we have two Cmp, which is not identical for split_if.
public static void test5(int a, int b){
if( b!=0) {
int_field = 35;
} else {
int_field =222;
}
if( b!=0) {
int_field = 35;
} else {
int_field =222;
}
}
Test: tier1, application/ctw/modules
-------------
Commit messages:
- 8304049: C2 can not merge trivial Ifs due to CastII
Changes: https://git.openjdk.org/jdk/pull/13039/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13039&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8304049
Stats: 53 lines in 7 files changed: 50 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/13039.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/13039/head:pull/13039
PR: https://git.openjdk.org/jdk/pull/13039
More information about the hotspot-compiler-dev
mailing list