RFR: 8334228: C2 SuperWord: fix JDK-24 regression in VPointer::cmp_for_sort after JDK-8325155
Emanuel Peter
epeter at openjdk.org
Thu Jun 13 13:49:36 UTC 2024
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.
-------------
Commit messages:
- widen the fix
- JDK-8334228
Changes: https://git.openjdk.org/jdk/pull/19696/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19696&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8334228
Stats: 75 lines in 2 files changed: 61 ins; 5 del; 9 mod
Patch: https://git.openjdk.org/jdk/pull/19696.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19696/head:pull/19696
PR: https://git.openjdk.org/jdk/pull/19696
More information about the hotspot-compiler-dev
mailing list