-
Bug
-
Resolution: Fixed
-
P2
-
11, 12, 13, 14, 15
-
b16
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8243140 | 14.0.2 | Christian Hagedorn | P2 | Resolved | Fixed | b04 |
JDK-8242372 | 11.0.8-oracle | Christian Hagedorn | P2 | Closed | Fixed | b03 |
JDK-8243133 | 11.0.8 | Christian Hagedorn | P2 | Resolved | Fixed | b01 |
A closer look at loop unswitching suggests that we need to copy the loop predicates down to both unswitched versions anyways. Otherwise, the pre/main/post code does not find the original loop predicates anymore due to the added loop selection if statement. It could then overunroll the main loop without properly updating the range check predicates. This has not been observed, yet. However, when running the attached test which overunrolls both unswitched loops, we hit the bad AD file assertion below which must be related to the missing loop predicates that need to be copied down to the main loop while creating pre/main/post loops. The same assertion error was reported originally before cloning the predicates down to the main loop while creating pre/main/post loops in
Default case invoked for:
opcode = 106, "Con"
o1 Con === o0 [[]] #top
--N: o1 Con === o0 [[]] #top
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/matcher.cpp:1563
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (open/src/hotspot/share/opto/matcher.cpp:1563), pid=4259, tid=4271
# assert(false) failed: bad AD file
#
# JRE version: Java(TM) SE Runtime Environment (15.0) (slowdebug build 15-internal+0-2019-11-08-0757471.christian...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 15-internal+0-2019-11-08-0757471.christian..., compiled mode, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xd99893] Matcher::Label_Root(Node const*, State*, Node*, Node const*)+0x4d3
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /home/christian/jdk/open/core.4259)
#
# An error report file with more information is saved as:
# /home/christian/jdk/open/hs_err_pid4259.log
#
# Compiler replay data is saved as:
# /home/christian/jdk/open/replay_pid4259.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 4271
Dumping core ...
Aborted (core dumped)
Reproduce:
java -Xcomp -XX:+TraceLoopOpts -XX:-TieredCompilation -XX:CompileCommand=compileonly,Overunrolling::test5 Overunrolling.java
The attached test was adapted from compiler/loopopts/TestOverunrolling::test5 by adding an additional if statement to trigger loop unswitching.
- backported by
-
JDK-8243133 Loop predicates should be copied to unswitched loops
- Resolved
-
JDK-8243140 Loop predicates should be copied to unswitched loops
- Resolved
-
JDK-8242372 Loop predicates should be copied to unswitched loops
- Closed
- relates to
-
JDK-8193130 Bad graph when unrolled loop bounds conflicts with range checks
- Resolved
-
JDK-8252696 Loop unswitching may cause out of bound array load to be executed
- Resolved
-
JDK-8203915 Induction variable of over-unrolled loop conflicts with range checks
- Closed
-
JDK-8237859 C2: Crash when loads float above range check
- Closed
-
JDK-8253644 C2: assert(skeleton_predicate_has_opaque(iff)) failed: unexpected
- Closed