RFR: 8334228: C2 SuperWord: fix JDK-24 regression in VPointer::cmp_for_sort after JDK-8325155
Christian Hagedorn
chagedorn at openjdk.org
Thu Jun 13 13:59:12 UTC 2024
On Thu, 13 Jun 2024 13:05:40 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
> This is a small regression from https://git.openjdk.org/jdk/pull/18822.
>
> An overflow in the subtraction between the offsets means that the offsets are not correctly sorted. This has no correctness impact, but hit a verification assert that checked if the offsets were correctly sorted.
>
> I now removed the subtractions, and replaced it with two comparisons.
>
> Just out of an abundance of caution, I also converted all other subtractions into comparisons - even though I could probably make an argument that the values would be guaranteed in ranges that would not underflow the subtraction.
Looks good. It probably is not necessary to convert some of them to use the macro. But it does not hurt either - so you can keep it.
-------------
Marked as reviewed by chagedorn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19696#pullrequestreview-2115885977
More information about the hotspot-compiler-dev
mailing list