RFR: 8356760: VectorAPI: Optimize VectorMask.fromLong for all-true/all-false cases [v8]

Jatin Bhateja jbhateja at openjdk.org
Thu Jul 31 03:11:08 UTC 2025


On Wed, 30 Jul 2025 07:06:52 GMT, Hannes Greule <hgreule at openjdk.org> wrote:

> I think there are a few (follow-up?) improvements that can be made:
> 
> 1. Using KnownBits and checking against that rather than requiring a constant in `is_maskall_type`. This is probably a bit difficult to test for now.
> 2. If the range of an input is known to be [-1, 0], we can use that as an input for a MaskAllNode.

Constants are the limiting case of KnownBits where all the bits are known, i.e., KnownBits.ZEROS | Known.Bits.ONES = -1, since the pattern check is especially over -1 / 0 constant values, hence what we have currently looks reasonable.

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

PR Comment: https://git.openjdk.org/jdk/pull/25793#issuecomment-3138416237


More information about the hotspot-compiler-dev mailing list