RFR: 8285868: x86_64 intrinsics for floating point methods isNaN, isFinite and isInfinite [v4]
Srinivas Vamsi Parasa
duke at openjdk.java.net
Wed May 18 07:47:59 UTC 2022
On Wed, 18 May 2022 07:00:10 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:
>> `setb` is producing the correct results and also adding the `xor dst, dst` didn't give any performance improvement. Is it still necessary?
>
> @vamsi-parasa Other boolean producers such as `Conv2B` or `VectorTest` widen the byte value to 32 bit after `setb` so I believe a zeroing is necessary here. You accidentally achieve correct results in tests because the boolean stores only read the least significant 8 bits of the `dst` registers. Other operations such as `test` will read full `int` and may lead to incorrect results.
>
> @jatin-bhateja Boolean is just dressed-up int except in stores so most readers will consume 32 bits of the register.
>
> Thanks.
@merykitty You might be right. `setb` was causing a wierd jdk build error in `java.lang.HashMap` due to to error in `isNaN()`. It got fixed by clearing the higher bytes of `dst` register which is being set by `setb`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8459
More information about the hotspot-compiler-dev
mailing list