RFR: 8300109: RISC-V: Improve code generation for MinI/MaxI nodes [v2]
Fei Yang
fyang at openjdk.org
Tue Jan 17 10:27:15 UTC 2023
On Mon, 16 Jan 2023 09:45:35 GMT, Ludovic Henry <luhenry at openjdk.org> wrote:
> I'm curious to see some JMH results on this change.
Well, not that much (%3 at most) when I run the max & min tests in JMH test [1] on my unmatched board:
Before:
Benchmark (seed) Mode Cnt Score Error Units
MathBench.maxInt 0 thrpt 8 97675.352 ± 4081.422 ops/ms
MathBench.maxLong 0 thrpt 8 105212.075 ± 5305.248 ops/ms
MathBench.minInt 0 thrpt 8 104321.539 ± 4342.072 ops/ms
MathBench.minLong 0 thrpt 8 97597.538 ± 3798.621 ops/ms
After:
Benchmark (seed) Mode Cnt Score Error Units
MathBench.maxInt 0 thrpt 8 97890.688 ± 6732.534 ops/ms
MathBench.maxLong 0 thrpt 8 107836.865 ± 3148.886 ops/ms
MathBench.minInt 0 thrpt 8 107521.081 ± 3992.511 ops/ms
MathBench.minLong 0 thrpt 8 97940.617 ± 3876.168 ops/ms
I think it will depend on the micro-architecture implementation. But the code generated should be always simplified in this case.
[1] https://github.com/openjdk/jdk/blob/master/test/micro/org/openjdk/bench/java/lang/MathBench.java#L301
-------------
PR: https://git.openjdk.org/jdk/pull/11988
More information about the hotspot-compiler-dev
mailing list