RFR: 8306302: C2 Superword fix: use VectorMaskCmp and VectorBlend instead of CMoveVF/D [v2]

Emanuel Peter epeter at openjdk.org
Fri May 19 05:21:50 UTC 2023


On Mon, 15 May 2023 07:47:19 GMT, Fei Gao <fgao at openjdk.org> wrote:

>>> The issue is this: `CmpF -> Bool [lt/le]` is unordered, because they both accept the return code `-1` from the `CmpF`, which also makes comparisons with `NaN` true. This means that such comparisons are `unordered`.
>>> 
>>> But `VectorMaskCmp` would interpret `lt/le` test-codes as `ordered`, so they would return false for `NaN` comparisons. So that is why we need to make a transformation here.
>>> 
>>> How would you improve my comments?
>> 
>> Thanks for your clarification.
>> 
>> Your comment is quite clear already. Maybe just highlight the mismatch between `VectorMaskCmp` and `bol_test` here, like:
>> 
>>           //
>>           // But with these two cases, which `VectorMaskCmp` interprets as ordered,
>>           // we must convert the unordered into an ordered comparison:
>>           //   BoolTest::lt:  Case -1    -> LT_U
>>           //   BoolTest::le:  Case -1, 0 -> LE_U
>>           //
>
>> @fg1417 Are you ok with how I worded it now?
> 
> Oh, yes. Clear enough!

@fg1417 Is there anything you still want me to change before you could approve this PR?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13493#discussion_r1198554476


More information about the hotspot-compiler-dev mailing list