On April 23, 2020 9:04:40 PM GMT+02:00, Jakub Jelinek <ja...@redhat.com> wrote:
>Hi!
>
>This PR is about the rs6000 backend emitting wrong assembly
>for whole vector shift by 0, and while I think it is desirable
>to fix the backend, I don't see a point why the expander should
>try to emit that, whole vector shift by 0 is identity, we can just
>return the operand.
>
>Bootstrapped/regtested on powerpc64{,le}-linux, ok for trunk?

OK. 

Richard. 

>2020-04-23  Jakub Jelinek  <ja...@redhat.com>
>
>       PR target/94710
>       * optabs.c (expand_vec_perm_const): For shift_amt const0_rtx
>       just return v2.
>
>--- gcc/optabs.c.jj    2020-04-17 14:18:44.380437703 +0200
>+++ gcc/optabs.c       2020-04-23 11:50:07.931780323 +0200
>@@ -5627,6 +5627,8 @@ expand_vec_perm_const (machine_mode mode
>       if (shift_amt)
>       {
>         class expand_operand ops[3];
>+        if (shift_amt == const0_rtx)
>+          return v2;
>         if (shift_code != CODE_FOR_nothing)
>           {
>             create_output_operand (&ops[0], target, mode);
>
>       Jakub

Reply via email to