]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Align the predictor style for define_insn_and_split
authorPan Li <pan2.li@intel.com>
Wed, 14 Jun 2023 02:10:44 +0000 (10:10 +0800)
committerPan Li <pan2.li@intel.com>
Thu, 15 Jun 2023 01:06:29 +0000 (09:06 +0800)
This patch is considered as the follow up of the below PATCH.

https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621347.html

We aligned the predictor style for the define_insn_and_split suggested
by Kito. To avoid potential issues before we hit.

Signed-off-by: Pan Li <pan2.li@intel.com>
gcc/ChangeLog:

* config/riscv/autovec-opt.md: Align the predictor sytle.
* config/riscv/autovec.md: Ditto.

gcc/config/riscv/autovec-opt.md
gcc/config/riscv/autovec.md

index aef28e445e18f9ae404fcbd55a58c71f120b5012..fb1b07205aa2dfb6ccc425fec4144c3ff3f80df6 100644 (file)
@@ -37,9 +37,9 @@
              (match_operand:<V_DOUBLE_TRUNC> 4 "register_operand" "   vr,   vr"))
            (match_operand:VWEXTI 3 "register_operand"             "   vr,   vr"))
          (match_operand:VWEXTI 2 "vector_merge_operand"           "   vu,    0")))]
-  "TARGET_VECTOR"
+  "TARGET_VECTOR && can_create_pseudo_p ()"
   "#"
-  "&& can_create_pseudo_p ()"
+  "&& 1"
   [(const_int 0)]
   {
     insn_code icode = code_for_pred_vf2 (<CODE>, <MODE>mode);
        (bitmanip_bitwise:VB
          (not:VB (match_operand:VB 2 "register_operand" " vr"))
          (match_operand:VB 1 "register_operand"         " vr")))]
-  "TARGET_VECTOR"
+  "TARGET_VECTOR && can_create_pseudo_p ()"
   "#"
-  "&& can_create_pseudo_p ()"
+  "&& 1"
   [(const_int 0)]
   {
     insn_code icode = code_for_pred_not (<CODE>, <MODE>mode);
          (any_bitwise:VB
            (match_operand:VB 1 "register_operand" " vr")
            (match_operand:VB 2 "register_operand" " vr"))))]
-  "TARGET_VECTOR"
+  "TARGET_VECTOR && can_create_pseudo_p ()"
   "#"
-  "&& can_create_pseudo_p ()"
+  "&& 1"
   [(const_int 0)]
   {
     insn_code icode = code_for_pred_n (<CODE>, <MODE>mode);
         (match_operand:VWEXTI 1 "register_operand"                 " vr,vr")
        (any_extend:VWEXTI
           (match_operand:<V_DOUBLE_TRUNC> 2 "vector_shift_operand" " vr,vk")))))]
-  "TARGET_VECTOR"
+  "TARGET_VECTOR && can_create_pseudo_p ()"
   "#"
-  "&& can_create_pseudo_p ()"
+  "&& 1"
   [(const_int 0)]
 {
   insn_code icode = code_for_pred_narrow (<any_shiftrt:CODE>, <MODE>mode);
       (any_shiftrt:VWEXTI
         (match_operand:VWEXTI 1 "register_operand"           " vr")
        (match_operand:<VEL> 2 "csr_operand"                 " rK"))))]
-  "TARGET_VECTOR"
+  "TARGET_VECTOR && can_create_pseudo_p ()"
   "#"
-  "&& can_create_pseudo_p ()"
+  "&& 1"
   [(const_int 0)]
 {
   operands[2] = gen_lowpart (Pmode, operands[2]);
index eadc2c5b5950a6ea2a499d399eb2a856f7054767..c23a625afe14735373d85fa825d4f9d47200bdbf 100644 (file)
     (any_shift:VI
      (match_operand:VI 1 "register_operand"    " vr")
      (match_operand:<VEL> 2 "csr_operand"      " rK")))]
-  "TARGET_VECTOR"
+  "TARGET_VECTOR && can_create_pseudo_p ()"
   "#"
-  "&& can_create_pseudo_p ()"
+  "&& 1"
   [(const_int 0)]
 {
   operands[2] = gen_lowpart (Pmode, operands[2]);
     (any_shift:VI
      (match_operand:VI 1 "register_operand"     " vr,vr")
      (match_operand:VI 2 "vector_shift_operand" " vr,vk")))]
-  "TARGET_VECTOR"
+  "TARGET_VECTOR && can_create_pseudo_p ()"
   "#"
-  "&& can_create_pseudo_p ()"
+  "&& 1"
   [(const_int 0)]
 {
   riscv_vector::emit_vlmax_insn (code_for_pred (<CODE>, <MODE>mode),
   [(set (match_operand:VB 0 "register_operand"                 "=vr")
        (any_bitwise:VB (match_operand:VB 1 "register_operand" " vr")
                        (match_operand:VB 2 "register_operand" " vr")))]
-  "TARGET_VECTOR"
+  "TARGET_VECTOR && can_create_pseudo_p ()"
   "#"
-  "&& can_create_pseudo_p ()"
+  "&& 1"
   [(const_int 0)]
   {
     insn_code icode = code_for_pred (<CODE>, <MODE>mode);
 (define_insn_and_split "one_cmpl<mode>2"
   [(set (match_operand:VB 0 "register_operand"         "=vr")
        (not:VB (match_operand:VB 1 "register_operand" " vr")))]
-  "TARGET_VECTOR"
+  "TARGET_VECTOR && can_create_pseudo_p ()"
   "#"
-  "&& can_create_pseudo_p ()"
+  "&& 1"
   [(const_int 0)]
   {
     insn_code icode = code_for_pred_not (<MODE>mode);
   [(set (match_operand:VWEXTI 0 "register_operand" "=&vr")
     (any_extend:VWEXTI
      (match_operand:<V_DOUBLE_TRUNC> 1 "register_operand" "vr")))]
-  "TARGET_VECTOR"
+  "TARGET_VECTOR && can_create_pseudo_p ()"
   "#"
-  "&& can_create_pseudo_p ()"
+  "&& 1"
   [(const_int 0)]
 {
   insn_code icode = code_for_pred_vf2 (<CODE>, <MODE>mode);
   [(set (match_operand:<V_DOUBLE_TRUNC> 0 "register_operand" "=vr")
     (truncate:<V_DOUBLE_TRUNC>
      (match_operand:VWEXTI 1 "register_operand"              " vr")))]
-  "TARGET_VECTOR"
+  "TARGET_VECTOR && can_create_pseudo_p ()"
   "#"
-  "&& can_create_pseudo_p ()"
+  "&& 1"
   [(const_int 0)]
 {
   insn_code icode = code_for_pred_trunc (<MODE>mode);