[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
Wed Jul 20 06:05:36 UTC 2022


On Wed, 20 Jul 2022 04:43:58 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Do you mean the `Flag_is_predicated_using_blend` used in the Idea is used to prevent optimizations like `ReverseBytesV (ReverseBytesV X , MASK) , MASK =>  X` when `ReverseBytesV` is predicated but implemented with `VectorBlend` ? So if it is,  then I think the input of ReverseBytesV should be `VectorBlend X (ReverseBytesV X) MASK` while not `ReverseBytesV X`, right?  Thanks!
>
> Hi @XiaohongGong , May be I was not explicit, currently we are skipping any ideal transformation for operations on predicated operations implemented using blend and  flag is set prior to a GVN transform, thus it can be safely used in ReverseBytes ideal routine. Since earlier these was no such flag and Blend node was created after GVN transform so it was not possible to skip transform for ReverseBytes[2] node.
> 
> ![image](https://user-images.githubusercontent.com/59989778/179898611-1f3f061a-f9c5-49e1-8469-8e802c4ce245.png)

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?

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

PR: https://git.openjdk.org/panama-vector/pull/182


More information about the panama-dev mailing list