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

erifan duke at openjdk.org
Tue Jul 22 09:07:26 UTC 2025


On Tue, 22 Jul 2025 08:54:23 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Do you mean this check  `Matcher::match_rule_supported_vector(opc, vlen, maskall_bt)` ? I think it's necessary ? Because in theory some platforms don't support both `MaskAll` and `Replicate`.  Of course, this situation may not exist in reality. If `MaskAll` and `Replicate` are not supported, then `VectorLongToMask` should not be supported either, and this function will not be called.
>
>> Do you mean this check `Matcher::match_rule_supported_vector(opc, vlen, maskall_bt)` ? I think it's necessary ? Because in theory some platforms don't support both `MaskAll` and `Replicate`. Of course, this situation may not exist in reality. If `MaskAll` and `Replicate` are not supported, then `VectorLongToMask` should not be supported either, and this function will not be called.
> 
> My suggestion was to check for Op_Replicate here as Op_MaskAll is already checked underneath VectorNode::scalar2vector under an assumption that MaskAll is a special case for replicate applicable to masks

Oh I misunderstood what you meant, now I understand, thank you!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25793#discussion_r2221829278


More information about the hotspot-compiler-dev mailing list