[vectorIntrinsics] RFR: 8283413: Add C2 mid-end and x86 back-end implementation for bit REVERSE and REVERSE_BYTES operation [v6]
Xiaohong Gong
xgong at openjdk.org
Fri Jul 22 08:33:33 UTC 2022
On Fri, 22 Jul 2022 08:12:44 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>>> Yeah, I know that is used to skip the transformations. I'm just curious why we need to skip the optimizations if it is used by a `VectorBlend`. Did you met any issues or something others? Thanks! I want to add a transformation such as `(ReverseBytesV src) => src` if the basic element type is T_BYTE. I cannot see the reason that I need to also skip this transformation for VectorBlend used ReverseBytesV. Maybe we can continue the discussion after I created a PR for it. WDYT?
>>
>> It was purely to skip matching over bigger graph pallet at that point, with blends pattern matching will be slightly complex and will need to be handled in VectorBlend idealization routines.
>
> I think we can have a separate PR to handle cascaded complementary masked operations over non-predicated targets to handle all the cases in one shot i.e. REVERSE, REVERSEBYTES, NOT.
>
> Other interesting transforms could be ROR X+ ROL X by same shift = X,
> complementary casts/re-interprets., X2Y + Y2X = X
> It was purely to skip matching over bigger graph pallet at that point, with blends pattern matching will be slightly complex and will need to be handled in VectorBlend idealization routines.
Make sense to me and thanks for the explanation!
> I think we can have a separate PR to handle cascaded complementary masked operations over non-predicated targets to handle all the cases in one shot i.e. REVERSE, REVERSEBYTES, NOT.
> Other interesting transforms could be ROR X+ ROL X by same shift = X,
> complementary casts/re-interprets., X2Y + Y2X = X
Yes, agree! Actually it still miss many gvn transformations for existing vector nodes that can be added in future gradually.
-------------
PR: https://git.openjdk.org/panama-vector/pull/182
More information about the panama-dev
mailing list