RFR: 8331717: C2: Crash with SIGFPE Because Loop Predication Wrongly Hoists Division Requiring Zero Check [v2]

Christian Hagedorn chagedorn at openjdk.org
Wed Dec 18 15:28:37 UTC 2024


On Wed, 18 Dec 2024 13:30:27 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> If you want to rewire the DivI to 293 RangeCheck, then you need to pin the DivI, making it not depends_only_on_test. A similar logic can be found in here for array accesses

It's probably the most safe way to eventually handle this similarly to array accesses as you suggest. Back there when the checks for `no_dependent_zero_check()` were introduced, we did not have the pinning for array accesses, in place.

However, for this bug, I think it's better to go with this rather simple point fix and file a follow-up RFE to revisit this and think about aligning it with array accesses with a pinning that's checkable with `depends_only_on_test()` as well. What do you think?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/22666#issuecomment-2551614177


More information about the hotspot-compiler-dev mailing list