Integrated: 8297539: Use PrimitiveConversions::cast for local uses of the int<->float union conversion trick

Afshin Zafari duke at openjdk.org
Sat Apr 1 01:05:43 UTC 2023


On Wed, 22 Mar 2023 10:59:18 GMT, Afshin Zafari <duke at openjdk.org> wrote:

> **Only** the instances of using `union` for converting `int` to `float` are replaced with call to `PrimitiveConversions::cast<To>(From)` method. Some few cases with conversion of `long` <->`double` are also replaced with `PrimitiveConversions::cast<To>(From)`. The other instances where the union contains other types of fields than `int` and `float` are left unchanged.
> 
> ### Test
> local hotspot:tier1
> mach5 tiers 1-5

This pull request has now been integrated.

Changeset: a19b28ab
Author:    Afshin Zafari <Afshin.zafari at oracle.com>
Committer: David Holmes <dholmes at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/a19b28ab3ed2d2da4eb04ce9b187dda8a75ba16a
Stats:     54 lines in 5 files changed: 6 ins; 21 del; 27 mod

8297539: Use PrimitiveConversions::cast for local uses of the int<->float union conversion trick

Reviewed-by: coleenp, kbarrett, dholmes

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

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


More information about the hotspot-dev mailing list