RFR: 8319429: Don't zero out mxcsr flag bits on ECore

Volodymyr Paprotski duke at openjdk.org
Mon Nov 6 15:49:13 UTC 2023


On Mon, 6 Nov 2023 05:01:33 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Improves vector rounding on ECore about 10x
>> 
>> (BEFORE) FpRoundingBenchmark.test_round_float        2048  thrpt    3  40.912 ± 0.044  ops/ms
>> (AFTER ) FpRoundingBenchmark.test_round_float        2048  thrpt    3  431.682 ± 0.727  ops/ms
>
> src/hotspot/cpu/x86/vm_version_x86.cpp line 864:
> 
>> 862:     (_model == 0x97 || _model == 0xAC || _model == 0xAF)) {
>> 863:     FLAG_SET_DEFAULT(DoEcoreOpt, true);
>> 864:   }
> 
> And what should happen if the flag is set true by the user and there is no Ecore? What affect will that have? Should it be allowed?

>From ISA point of view, they are the same, so if user flips flag on purpose, code will still be correct. Its also helpful to test Ecore optimized code on a Pcore (I have some more patches coming in under this option soon)

> src/hotspot/share/runtime/globals.hpp line 574:
> 
>> 572:   product(bool, DoEcoreOpt, false, DIAGNOSTIC,                              \
>> 573:           "Perform Ecore Optimization")                                     \
>> 574:                                                                             \
> 
> I think this should be a CPU specific flag in ./cpu/x86/globals_x86.hpp (similar to how we have linux specific flags in ./os/linux/globals_linux.hpp). Also the description should clarify that the default is actually true for Ecore systems, and false elsewhere.

Thanks, didn't know about that file, will try.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16504#discussion_r1383548150
PR Review Comment: https://git.openjdk.org/jdk/pull/16504#discussion_r1383547163


More information about the hotspot-dev mailing list