RFR: 8271203: C2: assert(iff->Opcode() == Op_If || iff->Opcode() == Op_CountedLoopEnd || iff->Opcode() == Op_RangeCheck) failed: Check this code when new subtype is added [v3]
Yi Yang
yyang at openjdk.java.net
Fri Aug 13 12:48:21 UTC 2021
On Fri, 13 Aug 2021 11:41:48 GMT, Yi Yang <yyang at openjdk.org> wrote:
>> Hi, I'm trying to fix [JDK-8271203](https://bugs.openjdk.java.net/browse/JDK-8271203). It's reasonable to unswitch LongCountedLoop, so relax it.
>>
>> ![image](https://user-images.githubusercontent.com/5010047/127302280-0faa90bb-add7-4639-8c63-49668901f267.png)
>
> Yi Yang has updated the pull request incrementally with one additional commit since the last revision:
>
> package
JTREG TEST:
public class Reduced {
static int iArrFld[] = new int[400];
public static void main(String[] strArr) {
for (int i = 0; i < 10; i++) {
test();
}
}
static void test() {
int i = 56, i2 = 22257;
do {
do {
int i24 = 1;
while (++i24 < 2) {
}
for (long l1 = i; l1 < 2; ++l1) {
iArrFld[0] += 5;
}
} while ((i2 -= 2) > 0); //line 22
for (long l3 = 8; l3 < 194; ++l3) { // line 23
}
} while (--i > 0); //line25
}
}
Well, the above CFG is corresponding to the last step(before beautify loops, [loop.xml.log](https://github.com/openjdk/jdk/files/6982404/loop.xml.log) ) before crash. I haven't learned about loopopts in C2 yet, it looks like B9 and B19-22 are refer to the same loop(`do{...} while ((i2 -= 2) > 0); `), the above CFG looks like:
static void test() {
int i = 56, i2 = 22257;
do {
if (xx) {
do{ ... } while ((i2 -= 2) > 0);
} else {
do{ ... } while ((i2 -= 2) > 0);
}
for (long l3 = 8; l3 < 194; ++l3) { // line 23
}
} while (--i > 0); //line25
}
...maybe that's not true.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4920
More information about the hotspot-compiler-dev
mailing list