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

Emanuel Peter epeter at openjdk.org
Thu May 11 08:45:47 UTC 2023


On Thu, 11 May 2023 08:23:46 GMT, Fei Gao <fgao at openjdk.org> wrote:

>> @fg1417 thanks for the suggestion about running with the flags over all jtreg. I'll do that now...
>
>> 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  Ah yes, that part could be a bit more explicit, thanks for the suggestion!

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

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


More information about the hotspot-compiler-dev mailing list