Fix bad code of vector extract of PC-relative address with variable element #.
authorMichael Meissner <meissner@linux.ibm.com>
Tue, 7 Jan 2020 01:34:19 +0000 (01:34 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Tue, 7 Jan 2020 01:34:19 +0000 (01:34 +0000)
2020-01-06  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/vsx.md (vsx_extract_<mode>_var, VSX_D iterator):
Use 'Q' for doing vector extract from memory.
(vsx_extract_v4sf_var): Use 'Q' for doing vector extract from
memory.
(vsx_extract_<mode>_var, VSX_EXTRACT_I iterator): Use 'Q' for
doing vector extract from memory.
(vsx_extract_<mode>_<VS_scalar>mode_var): Use 'Q' for doing vector
extract from memory.

From-SVN: r279938

gcc/ChangeLog
gcc/config/rs6000/vsx.md

index b2e6d8504b565cd98e34e89d9514b727f2d415fe..0f258ffd4e184ac5745d3fa5aca62e95ae708afa 100644 (file)
@@ -1,5 +1,14 @@
 2020-01-06  Michael Meissner  <meissner@linux.ibm.com>
 
+       * config/rs6000/vsx.md (vsx_extract_<mode>_var, VSX_D iterator):
+       Use 'Q' for doing vector extract from memory.
+       (vsx_extract_v4sf_var): Use 'Q' for doing vector extract from
+       memory.
+       (vsx_extract_<mode>_var, VSX_EXTRACT_I iterator): Use 'Q' for
+       doing vector extract from memory.
+       (vsx_extract_<mode>_<VS_scalar>mode_var): Use 'Q' for doing vector
+       extract from memory.
+
        * config/rs6000/rs6000.c (rs6000_adjust_vec_address): Add support
        for the offset being 34-bits when -mcpu=future is used.
 
index 909f29b9397d199b32a17330ade7281c5db67afd..189c7d842ace19a3544b72fffa3e5d90cc85298f 100644 (file)
 ;; Variable V2DI/V2DF extract
 (define_insn_and_split "vsx_extract_<mode>_var"
   [(set (match_operand:<VS_scalar> 0 "gpc_reg_operand" "=v,wa,r")
-       (unspec:<VS_scalar> [(match_operand:VSX_D 1 "input_operand" "v,m,m")
+       (unspec:<VS_scalar> [(match_operand:VSX_D 1 "input_operand" "v,Q,Q")
                             (match_operand:DI 2 "gpc_reg_operand" "r,r,r")]
                            UNSPEC_VSX_EXTRACT))
    (clobber (match_scratch:DI 3 "=r,&b,&b"))
 ;; Variable V4SF extract
 (define_insn_and_split "vsx_extract_v4sf_var"
   [(set (match_operand:SF 0 "gpc_reg_operand" "=wa,wa,?r")
-       (unspec:SF [(match_operand:V4SF 1 "input_operand" "v,m,m")
+       (unspec:SF [(match_operand:V4SF 1 "input_operand" "v,Q,Q")
                    (match_operand:DI 2 "gpc_reg_operand" "r,r,r")]
                   UNSPEC_VSX_EXTRACT))
    (clobber (match_scratch:DI 3 "=r,&b,&b"))
 (define_insn_and_split "vsx_extract_<mode>_var"
   [(set (match_operand:<VS_scalar> 0 "gpc_reg_operand" "=r,r,r")
        (unspec:<VS_scalar>
-        [(match_operand:VSX_EXTRACT_I 1 "input_operand" "v,v,m")
+        [(match_operand:VSX_EXTRACT_I 1 "input_operand" "v,v,Q")
          (match_operand:DI 2 "gpc_reg_operand" "r,r,r")]
         UNSPEC_VSX_EXTRACT))
    (clobber (match_scratch:DI 3 "=r,r,&b"))
   [(set (match_operand:<VS_scalar> 0 "gpc_reg_operand" "=r,r,r")
        (zero_extend:<VS_scalar>
         (unspec:<VSX_EXTRACT_I:VS_scalar>
-         [(match_operand:VSX_EXTRACT_I 1 "input_operand" "v,v,m")
+         [(match_operand:VSX_EXTRACT_I 1 "input_operand" "v,v,Q")
           (match_operand:DI 2 "gpc_reg_operand" "r,r,r")]
          UNSPEC_VSX_EXTRACT)))
    (clobber (match_scratch:DI 3 "=r,r,&b"))