Integrated: 8334843: RISC-V: Fix wraparound checking for r_array_index in lookup_secondary_supers_table_slow_path
Gui Cao
gcao at openjdk.org
Fri Jun 28 01:47:34 UTC 2024
On Mon, 24 Jun 2024 09:25:31 GMT, Gui Cao <gcao at openjdk.org> wrote:
> Branch condition for r_array_index wraparound checking in lookup_secondary_supers_table_slow_path is wrong.
>
> // Check for wraparound.
> Label skip;
> bge(r_array_length, r_array_index, skip);
> mv(r_array_index, zr);
> bind(skip);
>
> As discussed at https://github.com/openjdk/jdk/pull/19320/files#r1650548279 . If length == index, then we must set index to 0. That is `blt(r_array_index,r_array_length,skip);`.
>
> ### Correctness testing:
> - [x] Run tier1-3 tests on SOPHON SG2042 (release)
>
> ### JMH tested on Banana Pi BPI-F3 board (has Zbb) and Enable UseZbb
> without this patch:
>
> SecondarySupersLookup.testNegative00 avgt 15 13.275 ± 0.223 ns/op
> SecondarySupersLookup.testNegative01 avgt 15 13.264 ± 0.201 ns/op
> SecondarySupersLookup.testNegative02 avgt 15 13.261 ± 0.194 ns/op
> SecondarySupersLookup.testNegative03 avgt 15 13.271 ± 0.210 ns/op
> SecondarySupersLookup.testNegative04 avgt 15 13.265 ± 0.201 ns/op
> SecondarySupersLookup.testNegative05 avgt 15 13.258 ± 0.191 ns/op
> SecondarySupersLookup.testNegative06 avgt 15 13.280 ± 0.225 ns/op
> SecondarySupersLookup.testNegative07 avgt 15 13.268 ± 0.201 ns/op
> SecondarySupersLookup.testNegative08 avgt 15 13.266 ± 0.202 ns/op
> SecondarySupersLookup.testNegative09 avgt 15 13.261 ± 0.196 ns/op
> SecondarySupersLookup.testNegative10 avgt 15 13.268 ± 0.198 ns/op
> SecondarySupersLookup.testNegative16 avgt 15 13.268 ± 0.205 ns/op
> SecondarySupersLookup.testNegative20 avgt 15 13.284 ± 0.231 ns/op
> SecondarySupersLookup.testNegative30 avgt 15 13.281 ± 0.226 ns/op
> SecondarySupersLookup.testNegative32 avgt 15 13.273 ± 0.215 ns/op
> SecondarySupersLookup.testNegative40 avgt 15 13.287 ± 0.233 ns/op
> SecondarySupersLookup.testNegative50 avgt 15 13.292 ± 0.242 ns/op
> SecondarySupersLookup.testNegative55 avgt 15 53.064 ± 0.757 ns/op
> SecondarySupersLookup.testNegative56 avgt 15 53.052 ± 0.767 ns/op
> SecondarySupersLookup.testNegative57 avgt 15 53.068 ± 0.803 ns/op
> SecondarySupersLookup.testNegative58 avgt 15 53.076 ± 0.776 ns/op
> SecondarySupersLookup.testNegative59 avgt 15 53.095 ± 0.846 ns/op
> SecondarySupersLookup.testNegative60 avgt 15 75.106 ± 1.033 ns/op
> SecondarySupersLookup.testNegative61 avgt 15 76.832 ± 4.047 ns/op
> SecondarySupersLookup.testNegative62 avgt 15 75.085 ± 1.010 ns/op
> SecondarySupersLookup.testNegative63 avgt 15 153.709 ± 0.893 ns/op
> SecondarySupersLookup.testNegative64 ...
This pull request has now been integrated.
Changeset: cd46c87d
Author: Gui Cao <gcao at openjdk.org>
Committer: Fei Yang <fyang at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/cd46c87dc916b2b74067accf80c62df1792f74cf
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
8334843: RISC-V: Fix wraparound checking for r_array_index in lookup_secondary_supers_table_slow_path
Reviewed-by: fyang
-------------
PR: https://git.openjdk.org/jdk/pull/19852
More information about the hotspot-dev
mailing list