Re: [PATCH,rs6000] Backport of stxvl instruction fix to GCC 7

2018-07-10 Thread Segher Boessenkool
On Mon, Jul 09, 2018 at 04:50:03PM -0700, Carl Love wrote:
> The following patch is a back port for a commit to mainline prior to
> GCC 8 release.  Note, the code fixed by this patch was later modified
> in commit 256798 as part of adding vec_xst_len support.  The sldi
> instruction gets replaced by an ashift of the operand for the stxvl
> instruction.  Commit 256798 adds additional functionality and does not
> fix any functional issues.  Hence it is not being back ported, just the
> original bug fix given below.
> 
> The patch has been tested on 
> 
> powerpc64le-unknown-linux-gnu (Power 8 LE)  
> 
> With no regressions.
> 
> Please let me know if the patch looks OK for GCC 7.

This is fine.  Thanks!


Segher


>   Backport from mainline
>   2017-09-07  Carl Love  
> 
>   * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
>   the sldi instruction.


[PATCH,rs6000] Backport of stxvl instruction fix to GCC 7

2018-07-09 Thread Carl Love
GCC Maintainers:

The following patch is a back port for a commit to mainline prior to
GCC 8 release.  Note, the code fixed by this patch was later modified
in commit 256798 as part of adding vec_xst_len support.  The sldi
instruction gets replaced by an ashift of the operand for the stxvl
instruction.  Commit 256798 adds additional functionality and does not
fix any functional issues.  Hence it is not being back ported, just the
original bug fix given below.

The patch has been tested on 

powerpc64le-unknown-linux-gnu (Power 8 LE)  

With no regressions.

Please let me know if the patch looks OK for GCC 7.

 Carl Love
---
2018-07-09  Carl Love  

Backport from mainline
2017-09-07  Carl Love  

* config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
the sldi instruction.
---
 gcc/config/rs6000/vsx.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md
index eef5357..37d768f 100644
--- a/gcc/config/rs6000/vsx.md
+++ b/gcc/config/rs6000/vsx.md
@@ -3946,7 +3946,7 @@
      (match_operand:DI 2 "register_operand" "+r")]
     UNSPEC_STXVL))]
   "TARGET_P9_VECTOR && TARGET_64BIT"
-  "sldi %2,%2\;stxvl %x0,%1,%2"
+  "sldi %2,%2,56\;stxvl %x0,%1,%2"
   [(set_attr "length" "8")
(set_attr "type" "vecstore")])
 
-- 
2.7.4