Fix instruction types.
authorPat Haugen <pthaugen@linux.ibm.com>
Thu, 10 Sep 2020 14:46:46 +0000 (09:46 -0500)
committerPat Haugen <pthaugen@linux.ibm.com>
Thu, 10 Sep 2020 15:00:35 +0000 (10:00 -0500)
I noticed that some of the VSR<->GPR move instructions are not typed correctly. This patch fixes those instructions so that the scheduler treats them with the correct latency.

2020-09-10  Pat Haugen  <pthaugen@linux.ibm.com>

gcc/
* config/rs6000/rs6000.md
(lfiwzx, floatunssi<mode>2_lfiwzx, p8_mtvsrwz, p8_mtvsrd_sf): Fix insn
type.
* config/rs6000/vsx.md
(vsx_concat_<mode>, vsx_splat_<mode>_reg, vsx_splat_v4sf): Likewise.

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

index 43b620ae1c025eff91c4e3e808383ddf476ee665..f902c864c2626021dd9aa8c7ef4432db74cd8c38 100644 (file)
    lxsiwzx %x0,%y1
    mtvsrwz %x0,%1
    xxextractuw %x0,%x1,4"
-  [(set_attr "type" "fpload,fpload,mftgpr,vecexts")
+  [(set_attr "type" "fpload,fpload,mffgpr,vecexts")
    (set_attr "isa" "*,p8v,p8v,p9v")])
 
 (define_insn_and_split "floatunssi<mode>2_lfiwzx"
             *,          12,        *,         *")
    (set_attr "type"
            "load,       fpload,    fpload,    fpload,    store,     fpstore,
-            fpstore,    vecfloat,  mffgpr,    *")
+            fpstore,    vecfloat,  mftgpr,    *")
    (set_attr "isa"
            "*,          *,         p9v,       p8v,       *,         *,
             p8v,        p8v,       p8v,       *")])
                   UNSPEC_P8V_MTVSRWZ))]
   "!TARGET_POWERPC64 && TARGET_DIRECT_MOVE"
   "mtvsrwz %x0,%1"
-  [(set_attr "type" "mftgpr")])
+  [(set_attr "type" "mffgpr")])
 
 (define_insn_and_split "reload_fpr_from_gpr<mode>"
   [(set (match_operand:FMOVE64X 0 "register_operand" "=d")
                   UNSPEC_P8V_MTVSRD))]
   "TARGET_POWERPC64 && TARGET_DIRECT_MOVE"
   "mtvsrd %x0,%1"
-  [(set_attr "type" "mftgpr")])
+  [(set_attr "type" "mffgpr")])
 
 (define_insn_and_split "reload_vsx_from_gprsf"
   [(set (match_operand:SF 0 "register_operand" "=wa")
index 54da54c43dcc3f52d258bfc698a8edeb86f15a19..3a5cf896da83ccbee7eda96e4438de23cc5273f8 100644 (file)
   else
     gcc_unreachable ();
 }
-  [(set_attr "type" "vecperm")])
+  [(set_attr "type" "vecperm,vecmove")])
 
 ;; Combiner patterns to allow creating XXPERMDI's to access either double
 ;; word element in a vector register.
   "@
    xxpermdi %x0,%x1,%x1,0
    mtvsrdd %x0,%1,%1"
-  [(set_attr "type" "vecperm")])
+  [(set_attr "type" "vecperm,vecmove")])
 
 (define_insn "vsx_splat_<mode>_mem"
   [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
        (unspec:V4SF [(match_dup 0)
                      (const_int 0)] UNSPEC_VSX_XXSPLTW))]
   ""
-  [(set_attr "type" "vecload,vecperm,mftgpr")
+  [(set_attr "type" "vecload,vecperm,vecperm")
    (set_attr "length" "*,8,*")
    (set_attr "isa" "*,p8v,*")])