RFR: 8290917: x86: Memory-operand arithmetic instructions have too low costs [v2]

Quan Anh Mai duke at openjdk.org
Wed Sep 14 02:52:42 UTC 2022


On Tue, 13 Sep 2022 22:44:36 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   add benchmark
>
> I don't think we should replace the inc/dec by add.
> 
> On my desktop, I see the following:
> Before:
> Benchmark               Mode  Cnt    Score   Error  Units
> BasicRules.add_mem_con  avgt    3  132.268 ± 0.599  ns/op
> BasicRules.inc_mem      avgt    3  169.980 ± 0.617  ns/op
> 
> After:
> Benchmark               Mode  Cnt    Score   Error  Units
> BasicRules.add_mem_con  avgt    3  117.426 ± 0.128  ns/op
> BasicRules.inc_mem      avgt    3  182.907 ± 0.277  ns/op
> 
> The inc_mem jmh performance is worse after the patch. 
> 
> There is already UseIncDec option which is set appropriately to select whether to generate inc/dec or the add/sub instruction.

@sviswa7 Thanks a lot for your review, I have reverted that change. I don't understand why, though, it does not seem that the bottleneck is in the predecoder.

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

PR: https://git.openjdk.org/jdk/pull/9791


More information about the hotspot-compiler-dev mailing list