On 11/9/23 09:22, Stefan Schulze Frielinghaus wrote:
> Deal with cases where vpdi and vmr{l,h} are still applicable if the
> operands of those instructions are swapped.  For example, currently for
> 
> V2DI foo (V2DI x)
> {
>   return (V2DI) {x[1], x[0]};
> }
> 
> the assembler sequence
> 
> vlgvg   %r1,%v24,1
> vzero   %v0
> vlvgg   %v0,%r1,0
> vmrhg   %v24,%v0,%v24
> 
> is emitted.  With this patch a single vpdi is emitted.
> 
> Extensive tests are included in a subsequent patch of this series where
> more cases are covered.
> 
> Bootstrapped and regtested on s390.  Ok for mainline?
> 
> gcc/ChangeLog:
> 
>       * config/s390/s390.cc (expand_perm_with_merge): Deal with cases
>       where vmr{l,h} are still applicable if the operands are swapped.
>       (expand_perm_with_vpdi): Likewise for vpdi.

Ok, Thanks!

Andreas

Reply via email to