RFR: JDK-8272574: Crashes in PhaseIdealLoop::build_loop_late_post_work [v2]
Christian Hagedorn
chagedorn at openjdk.java.net
Thu Aug 19 11:24:24 UTC 2021
On Thu, 19 Aug 2021 02:57:12 GMT, 王超 <github.com+25214855+casparcwang at openjdk.org> wrote:
> I agree with you and your suggested fix looks more elegant in preventing such pinned load. I will analyze and test it to see whether it has unexpected side effects.
Thanks for having a closer look at my suggestion.
> What do you think about if the following guard is added to IdealLoopTree::is_range_check_if, which prevents loop predications float to predication point with dependency on the skipped predications(which is right after the predication point). When your suggested fix is applied, there is no pinned load currently. But I'm not sure whether it will occur again in the future.
Given that we could fix this bug without a bail out of loop predication, either by my suggested fix or something else, I'd say that this check should never be taken. And if it is taken it indicates a missed range check elimination opportunity. But you're right, we cannot really prove that there are currently no other such cases. I would therefore suggest to either turn your bailout code into an assertion check or keep your bailout but add an `assert(false)` to catch a missed case in the future to further investigate. If we will at some point face a non-fixable case we can still remove the assertion code again. But of course, all of this only applies if we can fix the current bug without bailing out of loop predication.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5142
More information about the hotspot-compiler-dev
mailing list