Re: [PATCH] Canonicalize vec_merge when mask is constant.

2023-05-03 Thread Hongtao Liu via Gcc-patches
On Mon, May 1, 2023 at 3:37 AM Jeff Law wrote: > > > > On 4/19/23 21:58, liuhongt via Gcc-patches wrote: > > Use swap_communattive_operands_p for canonicalization. When both value > > has same operand precedence value, then first bit in the mask should > > select first operand. > > > > The canonic

Re: [PATCH] Canonicalize vec_merge when mask is constant.

2023-04-30 Thread Jeff Law via Gcc-patches
On 4/19/23 21:58, liuhongt via Gcc-patches wrote: Use swap_communattive_operands_p for canonicalization. When both value has same operand precedence value, then first bit in the mask should select first operand. The canonicalization should help backends for pattern match. .i.e. x86 backend ha

[PATCH] Canonicalize vec_merge when mask is constant.

2023-04-19 Thread liuhongt via Gcc-patches
Use swap_communattive_operands_p for canonicalization. When both value has same operand precedence value, then first bit in the mask should select first operand. The canonicalization should help backends for pattern match. .i.e. x86 backend has lots of vec_merge patterns, combine will create any f