]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ira: Support more matching constraint forms with param [PR100328]
authorKewen Lin <linkw@linux.ibm.com>
Tue, 6 Jul 2021 01:53:19 +0000 (20:53 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Tue, 6 Jul 2021 01:53:19 +0000 (20:53 -0500)
This patch is to make IRA consider matching constraint heavily,
even if there is at least one other alternative with non-NO_REG
register class constraint, it will continue and check matching
constraint in all available alternatives and respect the
matching constraint with preferred register class.

One typical case is destructive FMA style instruction on rs6000.
Without this patch, for the mentioned FMA instruction, IRA won't
respect the matching constraint on VSX_REG since there are some
alternative with FLOAT_REG which doesn't have matching constraint.
It can cause extra register copies since later reload has to make
code to respect the constraint.  This patch make IRA respect this
matching constraint on VSX_REG which is the preferred regclass,
but it excludes some cases where for one preferred register class
there can be two or more alternatives, one of them has the
matching constraint, while another doesn't have.  It also
considers the possibility of free register copy.

With option Ofast unroll, this patch can help to improve SPEC2017
bmk 508.namd_r +2.42% and 519.lbm_r +2.43% on Power8 while
508.namd_r +3.02% and 519.lbm_r +3.85% on Power9 without any
remarkable degradations.  It also improved something on SVE as
testcase changes showed and Richard's confirmation.

Bootstrapped & regtested on powerpc64le-linux-gnu P9,
x86_64-redhat-linux and aarch64-linux-gnu.

gcc/ChangeLog:

PR rtl-optimization/100328
* doc/invoke.texi (ira-consider-dup-in-all-alts): Document new
parameter.
* ira.c (ira_get_dup_out_num): Adjust as parameter
param_ira_consider_dup_in_all_alts.
* params.opt (ira-consider-dup-in-all-alts): New.
* ira-conflicts.c (process_regs_for_copy): Add one parameter
single_input_op_has_cstr_p.
(get_freq_for_shuffle_copy): New function.
(add_insn_allocno_copies): Adjust as single_input_op_has_cstr_p.
* ira-int.h (ira_get_dup_out_num): Add one bool parameter.

gcc/testsuite/ChangeLog:

PR rtl-optimization/100328
* gcc.target/aarch64/sve/acle/asm/div_f16.c: Remove one xfail.
* gcc.target/aarch64/sve/acle/asm/div_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/div_f64.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/divr_f16.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/divr_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/divr_f64.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/mad_f16.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/mad_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/mad_f64.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/mla_f16.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/mla_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/mla_f64.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/mls_f16.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/mls_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/mls_f64.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/msb_f16.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/msb_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/msb_f64.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/mulx_f16.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/mulx_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/mulx_f64.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/nmad_f16.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/nmad_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/nmad_f64.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/nmla_f16.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/nmla_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/nmla_f64.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/nmls_f16.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/nmls_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/nmls_f64.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/nmsb_f16.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/nmsb_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/nmsb_f64.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/sub_f16.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/sub_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/sub_f64.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/subr_f16.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/subr_f32.c: Likewise.
* gcc.target/aarch64/sve/acle/asm/subr_f64.c: Likewise.

44 files changed:
gcc/doc/invoke.texi
gcc/ira-conflicts.c
gcc/ira-int.h
gcc/ira.c
gcc/params.opt
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/div_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/div_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/div_f64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/divr_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/divr_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/divr_f64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/mad_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/mad_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/mad_f64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/mla_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/mla_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/mla_f64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/mls_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/mls_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/mls_f64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/msb_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/msb_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/msb_f64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/mulx_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/mulx_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/mulx_f64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/nmad_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/nmad_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/nmad_f64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/nmla_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/nmla_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/nmla_f64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/nmls_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/nmls_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/nmls_f64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/nmsb_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/nmsb_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/nmsb_f64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/sub_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/sub_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/sub_f64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_f16.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_f32.c
gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_f64.c

index a9fd5fdc104ce5261510e574497502a220ff0e91..f470fc6be58e7f98e3176ffac5c912d0ddec7119 100644 (file)
@@ -13917,6 +13917,16 @@ of available registers reserved for some other purposes is given
 by this parameter.  Default of the parameter
 is the best found from numerous experiments.
 
+@item ira-consider-dup-in-all-alts
+Make IRA to consider matching constraint (duplicated operand number)
+heavily in all available alternatives for preferred register class.
+If it is set as zero, it means IRA only respects the matching
+constraint when it's in the only available alternative with an
+appropriate register class.  Otherwise, it means IRA will check all
+available alternatives for preferred register class even if it has
+found some choice with an appropriate register class and respect the
+found qualified matching constraint.
+
 @item lra-inheritance-ebb-probability-cutoff
 LRA tries to reuse values reloaded in registers in subsequent insns.
 This optimization is called inheritance.  EBB is used as a region to
index d83cfc1c1a708ba04f5e01a395721540e31173f0..86c6f242f18d7085b9e8e600b23f6d4cd2697cea 100644 (file)
@@ -233,19 +233,30 @@ go_through_subreg (rtx x, int *offset)
   return reg;
 }
 
+/* Return the recomputed frequency for this shuffle copy or its similar
+   case, since it's not for a real move insn, make it smaller.  */
+
+static int
+get_freq_for_shuffle_copy (int freq)
+{
+  return freq < 8 ? 1 : freq / 8;
+}
+
 /* Process registers REG1 and REG2 in move INSN with execution
    frequency FREQ.  The function also processes the registers in a
    potential move insn (INSN == NULL in this case) with frequency
    FREQ.  The function can modify hard register costs of the
    corresponding allocnos or create a copy involving the corresponding
    allocnos.  The function does nothing if the both registers are hard
-   registers.  When nothing is changed, the function returns
-   FALSE.  */
+   registers.  When nothing is changed, the function returns FALSE.
+   SINGLE_INPUT_OP_HAS_CSTR_P is only meaningful when constraint_p
+   is true, see function ira_get_dup_out_num for its meaning.  */
 static bool
-process_regs_for_copy (rtx reg1, rtx reg2, bool constraint_p,
-                      rtx_insn *insn, int freq)
+process_regs_for_copy (rtx reg1, rtx reg2, bool constraint_p, rtx_insn *insn,
+                      int freq, bool single_input_op_has_cstr_p = true)
 {
-  int allocno_preferenced_hard_regno, cost, index, offset1, offset2;
+  int allocno_preferenced_hard_regno, index, offset1, offset2;
+  int cost, conflict_cost, move_cost;
   bool only_regs_p;
   ira_allocno_t a;
   reg_class_t rclass, aclass;
@@ -306,9 +317,52 @@ process_regs_for_copy (rtx reg1, rtx reg2, bool constraint_p,
     return false;
   ira_init_register_move_cost_if_necessary (mode);
   if (HARD_REGISTER_P (reg1))
-    cost = ira_register_move_cost[mode][aclass][rclass] * freq;
+    move_cost = ira_register_move_cost[mode][aclass][rclass];
+  else
+    move_cost = ira_register_move_cost[mode][rclass][aclass];
+
+  if (!single_input_op_has_cstr_p)
+    {
+      /* When this is a constraint copy and the matching constraint
+        doesn't only exist for this given operand but also for some
+        other operand(s), it means saving the possible move cost does
+        NOT need to require reg1 and reg2 to use the same hardware
+        register, so this hardware preference isn't required to be
+        fixed.  To avoid it to over prefer this hardware register,
+        and over disparage this hardware register on conflicted
+        objects, we need some cost tweaking here, similar to what
+        we do for shuffle copy.  */
+      gcc_assert (constraint_p);
+      int reduced_freq = get_freq_for_shuffle_copy (freq);
+      if (HARD_REGISTER_P (reg1))
+       /* For reg2 = opcode(reg1, reg3 ...), assume that reg3 is a
+          pseudo register which has matching constraint on reg2,
+          even if reg2 isn't assigned by reg1, it's still possible
+          not to have register moves if reg2 and reg3 use the same
+          hardware register.  So to avoid the allocation to over
+          prefer reg1, we can just take it as a shuffle copy.  */
+       cost = conflict_cost = move_cost * reduced_freq;
+      else
+       {
+         /* For reg1 = opcode(reg2, reg3 ...), assume that reg3 is a
+            pseudo register which has matching constraint on reg2,
+            to save the register move, it's better to assign reg1
+            to either of reg2 and reg3 (or one of other pseudos like
+            reg3), it's reasonable to use freq for the cost.  But
+            for conflict_cost, since reg2 and reg3 conflicts with
+            each other, both of them has the chance to be assigned
+            by reg1, assume reg3 has one copy which also conflicts
+            with reg2, we shouldn't make it less preferred on reg1
+            since reg3 has the same chance to be assigned by reg1.
+            So it adjusts the conflic_cost to make it same as what
+            we use for shuffle copy.  */
+         cost = move_cost * freq;
+         conflict_cost = move_cost * reduced_freq;
+       }
+    }
   else
-    cost = ira_register_move_cost[mode][rclass][aclass] * freq;
+    cost = conflict_cost = move_cost * freq;
+
   do
     {
       ira_allocate_and_set_costs
@@ -317,7 +371,7 @@ process_regs_for_copy (rtx reg1, rtx reg2, bool constraint_p,
       ira_allocate_and_set_costs
        (&ALLOCNO_CONFLICT_HARD_REG_COSTS (a), aclass, 0);
       ALLOCNO_HARD_REG_COSTS (a)[index] -= cost;
-      ALLOCNO_CONFLICT_HARD_REG_COSTS (a)[index] -= cost;
+      ALLOCNO_CONFLICT_HARD_REG_COSTS (a)[index] -= conflict_cost;
       if (ALLOCNO_HARD_REG_COSTS (a)[index] < ALLOCNO_CLASS_COST (a))
        ALLOCNO_CLASS_COST (a) = ALLOCNO_HARD_REG_COSTS (a)[index];
       ira_add_allocno_pref (a, allocno_preferenced_hard_regno, freq);
@@ -420,7 +474,8 @@ add_insn_allocno_copies (rtx_insn *insn)
       operand = recog_data.operand[i];
       if (! REG_SUBREG_P (operand))
        continue;
-      if ((n = ira_get_dup_out_num (i, alts)) >= 0)
+      bool single_input_op_has_cstr_p;
+      if ((n = ira_get_dup_out_num (i, alts, single_input_op_has_cstr_p)) >= 0)
        {
          bound_p[n] = true;
          dup = recog_data.operand[n];
@@ -429,8 +484,8 @@ add_insn_allocno_copies (rtx_insn *insn)
                                REG_P (operand)
                                ? operand
                                : SUBREG_REG (operand)) != NULL_RTX)
-           process_regs_for_copy (operand, dup, true, NULL,
-                                  freq);
+           process_regs_for_copy (operand, dup, true, NULL, freq,
+                                  single_input_op_has_cstr_p);
        }
     }
   for (i = 0; i < recog_data.n_operands; i++)
@@ -440,13 +495,15 @@ add_insn_allocno_copies (rtx_insn *insn)
          && find_reg_note (insn, REG_DEAD,
                            REG_P (operand)
                            ? operand : SUBREG_REG (operand)) != NULL_RTX)
-       /* If an operand dies, prefer its hard register for the output
-          operands by decreasing the hard register cost or creating
-          the corresponding allocno copies.  The cost will not
-          correspond to a real move insn cost, so make the frequency
-          smaller.  */
-       process_reg_shuffles (insn, operand, i, freq < 8 ? 1 : freq / 8,
-                             bound_p);
+       {
+         /* If an operand dies, prefer its hard register for the output
+            operands by decreasing the hard register cost or creating
+            the corresponding allocno copies.  The cost will not
+            correspond to a real move insn cost, so make the frequency
+            smaller.  */
+         int new_freq = get_freq_for_shuffle_copy (freq);
+         process_reg_shuffles (insn, operand, i, new_freq, bound_p);
+       }
     }
 }
 
index 31e013b0461b840a001817ddc6de67363c053c8a..da748626e3135adb52ddde7b1deed564078e8f44 100644 (file)
@@ -971,7 +971,7 @@ extern void ira_debug_disposition (void);
 extern void ira_debug_allocno_classes (void);
 extern void ira_init_register_move_cost (machine_mode);
 extern alternative_mask ira_setup_alts (rtx_insn *);
-extern int ira_get_dup_out_num (int, alternative_mask);
+extern int ira_get_dup_out_num (int, alternative_mask, bool &);
 
 /* ira-build.c */
 
index 638ef4ea17ef38806b443a32efe965aa45e83d24..866fb98f2e5acf9203f4f3f373e6014e23970510 100644 (file)
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -1922,9 +1922,25 @@ ira_setup_alts (rtx_insn *insn)
 /* Return the number of the output non-early clobber operand which
    should be the same in any case as operand with number OP_NUM (or
    negative value if there is no such operand).  ALTS is the mask
-   of alternatives that we should consider.  */
+   of alternatives that we should consider.  SINGLE_INPUT_OP_HAS_CSTR_P
+   should be set in this function, it indicates whether there is only
+   a single input operand which has the matching constraint on the
+   output operand at the position specified in return value.  If the
+   pattern allows any one of several input operands holds the matching
+   constraint, it's set as false, one typical case is destructive FMA
+   instruction on target rs6000.  Note that for a non-NO_REG preferred
+   register class with no free register move copy, if the parameter
+   PARAM_IRA_CONSIDER_DUP_IN_ALL_ALTS is set to one, this function
+   will check all available alternatives for matching constraints,
+   even if it has found or will find one alternative with non-NO_REG
+   regclass, it can respect more cases with matching constraints.  If
+   PARAM_IRA_CONSIDER_DUP_IN_ALL_ALTS is set to zero,
+   SINGLE_INPUT_OP_HAS_CSTR_P is always true, it will stop to find
+   matching constraint relationship once it hits some alternative with
+   some non-NO_REG regclass.  */
 int
-ira_get_dup_out_num (int op_num, alternative_mask alts)
+ira_get_dup_out_num (int op_num, alternative_mask alts,
+                    bool &single_input_op_has_cstr_p)
 {
   int curr_alt, c, original;
   bool ignore_p, use_commut_op_p;
@@ -1937,10 +1953,42 @@ ira_get_dup_out_num (int op_num, alternative_mask alts)
     return -1;
   str = recog_data.constraints[op_num];
   use_commut_op_p = false;
+  single_input_op_has_cstr_p = true;
+
+  rtx op = recog_data.operand[op_num];
+  int op_regno = reg_or_subregno (op);
+  enum reg_class op_pref_cl = reg_preferred_class (op_regno);
+  machine_mode op_mode = GET_MODE (op);
+
+  ira_init_register_move_cost_if_necessary (op_mode);
+  /* If the preferred regclass isn't NO_REG, continue to find the matching
+     constraint in all available alternatives with preferred regclass, even
+     if we have found or will find one alternative whose constraint stands
+     for a REG (non-NO_REG) regclass.  Note that it would be fine not to
+     respect matching constraint if the register copy is free, so exclude
+     it.  */
+  bool respect_dup_despite_reg_cstr
+    = param_ira_consider_dup_in_all_alts
+      && op_pref_cl != NO_REGS
+      && ira_register_move_cost[op_mode][op_pref_cl][op_pref_cl] > 0;
+
+  /* Record the alternative whose constraint uses the same regclass as the
+     preferred regclass, later if we find one matching constraint for this
+     operand with preferred reclass, we will visit these recorded
+     alternatives to check whether if there is one alternative in which no
+     any INPUT operands have one matching constraint same as our candidate.
+     If yes, it means there is one alternative which is perfectly fine
+     without satisfying this matching constraint.  If no, it means in any
+     alternatives there is one other INPUT operand holding this matching
+     constraint, it's fine to respect this matching constraint and further
+     create this constraint copy since it would become harmless once some
+     other takes preference and it's interfered.  */
+  alternative_mask pref_cl_alts;
+
   for (;;)
     {
-      rtx op = recog_data.operand[op_num];
-      
+      pref_cl_alts = 0;
+
       for (curr_alt = 0, ignore_p = !TEST_BIT (alts, curr_alt),
           original = -1;;)
        {
@@ -1963,9 +2011,25 @@ ira_get_dup_out_num (int op_num, alternative_mask alts)
                {
                  enum constraint_num cn = lookup_constraint (str);
                  enum reg_class cl = reg_class_for_constraint (cn);
-                 if (cl != NO_REGS
-                     && !targetm.class_likely_spilled_p (cl))
-                   goto fail;
+                 if (cl != NO_REGS && !targetm.class_likely_spilled_p (cl))
+                   {
+                     if (respect_dup_despite_reg_cstr)
+                       {
+                         /* If it's free to move from one preferred class to
+                            the one without matching constraint, it doesn't
+                            have to respect this constraint with costs.  */
+                         if (cl != op_pref_cl
+                             && (ira_reg_class_intersect[cl][op_pref_cl]
+                                 != NO_REGS)
+                             && (ira_may_move_in_cost[op_mode][op_pref_cl][cl]
+                                 == 0))
+                           goto fail;
+                         else if (cl == op_pref_cl)
+                           pref_cl_alts |= ALTERNATIVE_BIT (curr_alt);
+                       }
+                     else
+                       goto fail;
+                   }
                  if (constraint_satisfied_p (op, cn))
                    goto fail;
                  break;
@@ -1979,7 +2043,21 @@ ira_get_dup_out_num (int op_num, alternative_mask alts)
                  str = end;
                  if (original != -1 && original != n)
                    goto fail;
-                 original = n;
+                 gcc_assert (n < recog_data.n_operands);
+                 if (respect_dup_despite_reg_cstr)
+                   {
+                     const operand_alternative *op_alt
+                       = &recog_op_alt[curr_alt * recog_data.n_operands];
+                     /* Only respect the one with preferred rclass, without
+                        respect_dup_despite_reg_cstr it's possible to get
+                        one whose regclass isn't preferred first before,
+                        but it would fail since there should be other
+                        alternatives with preferred regclass.  */
+                     if (op_alt[n].cl == op_pref_cl)
+                       original = n;
+                   }
+                 else
+                   original = n;
                  continue;
                }
              }
@@ -1988,7 +2066,39 @@ ira_get_dup_out_num (int op_num, alternative_mask alts)
       if (original == -1)
        goto fail;
       if (recog_data.operand_type[original] == OP_OUT)
-       return original;
+       {
+         if (pref_cl_alts == 0)
+           return original;
+         /* Visit these recorded alternatives to check whether
+            there is one alternative in which no any INPUT operands
+            have one matching constraint same as our candidate.
+            Give up this candidate if so.  */
+         int nop, nalt;
+         for (nalt = 0; nalt < recog_data.n_alternatives; nalt++)
+           {
+             if (!TEST_BIT (pref_cl_alts, nalt))
+               continue;
+             const operand_alternative *op_alt
+               = &recog_op_alt[nalt * recog_data.n_operands];
+             bool dup_in_other = false;
+             for (nop = 0; nop < recog_data.n_operands; nop++)
+               {
+                 if (recog_data.operand_type[nop] != OP_IN)
+                   continue;
+                 if (nop == op_num)
+                   continue;
+                 if (op_alt[nop].matches == original)
+                   {
+                     dup_in_other = true;
+                     break;
+                   }
+               }
+             if (!dup_in_other)
+               return -1;
+           }
+         single_input_op_has_cstr_p = false;
+         return original;
+       }
     fail:
       if (use_commut_op_p)
        break;
index 18e6036c4f425eaceb8da8d3dee4e91d0e4452c2..577cd42c173de85362a037eb0067f640ed1b5bdc 100644 (file)
@@ -330,6 +330,10 @@ Max size of conflict table in MB.
 Common Joined UInteger Var(param_ira_max_loops_num) Init(100) Param Optimization
 Max loops number for regional RA.
 
+-param=ira-consider-dup-in-all-alts=
+Common Joined UInteger Var(param_ira_consider_dup_in_all_alts) Init(1) IntegerRange(0, 1) Param Optimization
+Control ira to consider matching constraint (duplicated operand number) heavily in all available alternatives for preferred register class.  If it is set as zero, it means ira only respects the matching constraint when it's in the only available alternative with an appropriate register class.  Otherwise, it means ira will check all available alternatives for preferred register class even if it has found some choice with an appropriate register class and respect the found qualified matching constraint.
+
 -param=iv-always-prune-cand-set-bound=
 Common Joined UInteger Var(param_iv_always_prune_cand_set_bound) Init(10) Param Optimization
 If number of candidates in the set is smaller, we always try to remove unused ivs during its optimization.
index 35f5c15891185bb5e312e17f86f03f1deabed53f..8bcd094c9960bdc49f8afaafb025cf62dfa214c9 100644 (file)
@@ -218,7 +218,7 @@ TEST_UNIFORM_ZD (div_h4_f16_x_tied1, svfloat16_t, __fp16,
                 z0 = svdiv_x (p0, z0, d4))
 
 /*
-** div_h4_f16_x_untied: { xfail *-*-* }
+** div_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fdivr   z0\.h, p0/m, z0\.h, z1\.h
 **     ret
index 40cc203da6788cebc6402b77e34f81aefe4277a0..546c61dc78302a5260b2420612e92ff31a58b315 100644 (file)
@@ -218,7 +218,7 @@ TEST_UNIFORM_ZD (div_s4_f32_x_tied1, svfloat32_t, float,
                 z0 = svdiv_x (p0, z0, d4))
 
 /*
-** div_s4_f32_x_untied: { xfail *-*-* }
+** div_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fdivr   z0\.s, p0/m, z0\.s, z1\.s
 **     ret
index 56acbbe95503216d949f9627718fa512e2341b2e..1e24bc2648404f570dbc703a8a9c52f1fc8b0a2f 100644 (file)
@@ -218,7 +218,7 @@ TEST_UNIFORM_ZD (div_d4_f64_x_tied1, svfloat64_t, double,
                 z0 = svdiv_x (p0, z0, d4))
 
 /*
-** div_d4_f64_x_untied: { xfail *-*-* }
+** div_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fdivr   z0\.d, p0/m, z0\.d, z1\.d
 **     ret
index 03cc0343bd2c3b5f05c5cd08abc1c0606de8f92f..e293be65a060bff0ed954534b3833b750e7f9841 100644 (file)
@@ -239,7 +239,7 @@ TEST_UNIFORM_ZD (divr_h4_f16_x_tied1, svfloat16_t, __fp16,
                 z0 = svdivr_x (p0, z0, d4))
 
 /*
-** divr_h4_f16_x_untied: { xfail *-*-* }
+** divr_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fdiv    z0\.h, p0/m, z0\.h, z1\.h
 **     ret
index c2b65fc33fac56b31c7383ae5712b1e97854ee7c..04a7ac40bb2482fe613365f2c25559cff2cf454a 100644 (file)
@@ -239,7 +239,7 @@ TEST_UNIFORM_ZD (divr_s4_f32_x_tied1, svfloat32_t, float,
                 z0 = svdivr_x (p0, z0, d4))
 
 /*
-** divr_s4_f32_x_untied: { xfail *-*-* }
+** divr_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fdiv    z0\.s, p0/m, z0\.s, z1\.s
 **     ret
index 0a72a37b1d5fb46e99c5582eae8508859ca5a2b3..bef1a9b059cb4899e3aef7b5a90429a9998248a0 100644 (file)
@@ -239,7 +239,7 @@ TEST_UNIFORM_ZD (divr_d4_f64_x_tied1, svfloat64_t, double,
                 z0 = svdivr_x (p0, z0, d4))
 
 /*
-** divr_d4_f64_x_untied: { xfail *-*-* }
+** divr_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fdiv    z0\.d, p0/m, z0\.d, z1\.d
 **     ret
index 7656f9e541025b5356a368e1599734a34c48b7e6..4b3148419c5c44edff324046c2c3576eb446526b 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (mad_h4_f16_x_tied2, svfloat16_t, __fp16,
                 z0 = svmad_x (p0, z1, z0, d4))
 
 /*
-** mad_h4_f16_x_untied: { xfail *-*-* }
+** mad_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fmla    z0\.h, p0/m, z1\.h, z2\.h
 **     ret
index dbdd2b9d10b1b85b133ae3ba61cff069c904ca4f..d5dbc85d5a3c92fe588dc3cdc0186590ab46270a 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (mad_s4_f32_x_tied2, svfloat32_t, float,
                 z0 = svmad_x (p0, z1, z0, d4))
 
 /*
-** mad_s4_f32_x_untied: { xfail *-*-* }
+** mad_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fmla    z0\.s, p0/m, z1\.s, z2\.s
 **     ret
index 978281295e8101bc70d2e0bd41f8e4f2e585fb35..7b5dc22826e4e2abaacfe5413ced88f21b90e8a9 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (mad_d4_f64_x_tied2, svfloat64_t, double,
                 z0 = svmad_x (p0, z1, z0, d4))
 
 /*
-** mad_d4_f64_x_untied: { xfail *-*-* }
+** mad_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fmla    z0\.d, p0/m, z1\.d, z2\.d
 **     ret
index f22a582efa656c64cd1393651b63c72cedbced8c..d32ce5845d10143239d79a9d3a27991fe1b5541c 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (mla_h4_f16_x_tied2, svfloat16_t, __fp16,
                 z0 = svmla_x (p0, z1, z0, d4))
 
 /*
-** mla_h4_f16_x_untied: { xfail *-*-* }
+** mla_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fmad    z0\.h, p0/m, z2\.h, z1\.h
 **     ret
index 1d95eb0a724d712a141f9bd30c8d6da3da5dd4c6..d10ba69a53ef5f970873606b62ade5920d71225c 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (mla_s4_f32_x_tied2, svfloat32_t, float,
                 z0 = svmla_x (p0, z1, z0, d4))
 
 /*
-** mla_s4_f32_x_untied: { xfail *-*-* }
+** mla_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fmad    z0\.s, p0/m, z2\.s, z1\.s
 **     ret
index 74fd2926710bcd77acd4406bc9fe2c2a24b1ff47..94c1e0b07532af08e3c7323b2bca0da411c5588c 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (mla_d4_f64_x_tied2, svfloat64_t, double,
                 z0 = svmla_x (p0, z1, z0, d4))
 
 /*
-** mla_d4_f64_x_untied: { xfail *-*-* }
+** mla_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fmad    z0\.d, p0/m, z2\.d, z1\.d
 **     ret
index 87fba3da7ffc60de90aae0b0deed4c9580daede0..b58104d5eafecf6eace317535accb913924b772c 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (mls_h4_f16_x_tied2, svfloat16_t, __fp16,
                 z0 = svmls_x (p0, z1, z0, d4))
 
 /*
-** mls_h4_f16_x_untied: { xfail *-*-* }
+** mls_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fmsb    z0\.h, p0/m, z2\.h, z1\.h
 **     ret
index 04ce1ec46e037fecbb6d0d71287e3080447555a7..7d6e60519b0c2521fab5057e1fb43431a203c62f 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (mls_s4_f32_x_tied2, svfloat32_t, float,
                 z0 = svmls_x (p0, z1, z0, d4))
 
 /*
-** mls_s4_f32_x_untied: { xfail *-*-* }
+** mls_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fmsb    z0\.s, p0/m, z2\.s, z1\.s
 **     ret
index 1e2108af671413bccbacb82c16ad3f47f30e231a..a6ed28eec5c3a0d9039a43fd0b81b1105aa0c8c9 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (mls_d4_f64_x_tied2, svfloat64_t, double,
                 z0 = svmls_x (p0, z1, z0, d4))
 
 /*
-** mls_d4_f64_x_untied: { xfail *-*-* }
+** mls_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fmsb    z0\.d, p0/m, z2\.d, z1\.d
 **     ret
index fe11457c4f884d6c67a98ee6c06be2a9fb62e55d..894961a9ec58ffffd18f7feea7cb6a3e15e1671d 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (msb_h4_f16_x_tied2, svfloat16_t, __fp16,
                 z0 = svmsb_x (p0, z1, z0, d4))
 
 /*
-** msb_h4_f16_x_untied: { xfail *-*-* }
+** msb_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fmls    z0\.h, p0/m, z1\.h, z2\.h
 **     ret
index f7a9f2767e83ed5723c6632a35494c141cf654fd..0d0915958a3dbe9ba5346ff4859a02ab3c858899 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (msb_s4_f32_x_tied2, svfloat32_t, float,
                 z0 = svmsb_x (p0, z1, z0, d4))
 
 /*
-** msb_s4_f32_x_untied: { xfail *-*-* }
+** msb_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fmls    z0\.s, p0/m, z1\.s, z2\.s
 **     ret
index e3ff414d81a480c3e634285359bb32aad1d0d68e..52dc3968e2470d39ebcbdd405ac968618f76e41e 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (msb_d4_f64_x_tied2, svfloat64_t, double,
                 z0 = svmsb_x (p0, z1, z0, d4))
 
 /*
-** msb_d4_f64_x_untied: { xfail *-*-* }
+** msb_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fmls    z0\.d, p0/m, z1\.d, z2\.d
 **     ret
index ce02c3caa3957157ab20599e1f2ef45c3093a57a..b8d6bf5d92c8516d8e640eacdb556a0389de7e65 100644 (file)
@@ -303,7 +303,7 @@ TEST_UNIFORM_ZD (mulx_h4_f16_x_tied1, svfloat16_t, __fp16,
                 z0 = svmulx_x (p0, z0, d4))
 
 /*
-** mulx_h4_f16_x_untied: { xfail *-*-* }
+** mulx_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fmulx   z0\.h, p0/m, z0\.h, z1\.h
 **     ret
index e0d3695932cf885601a1c6a25c5f653c1160d7b7..b8f5c1310d7633f537b3e04f60d1a5c38b3f173b 100644 (file)
@@ -303,7 +303,7 @@ TEST_UNIFORM_ZD (mulx_s4_f32_x_tied1, svfloat32_t, float,
                 z0 = svmulx_x (p0, z0, d4))
 
 /*
-** mulx_s4_f32_x_untied: { xfail *-*-* }
+** mulx_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fmulx   z0\.s, p0/m, z0\.s, z1\.s
 **     ret
index 6af5703ffaf388b733a325c1d289902f4b290a11..746cc94143dc184cc0a9cf080dd14e64c7e7639e 100644 (file)
@@ -303,7 +303,7 @@ TEST_UNIFORM_ZD (mulx_d4_f64_x_tied1, svfloat64_t, double,
                 z0 = svmulx_x (p0, z0, d4))
 
 /*
-** mulx_d4_f64_x_untied: { xfail *-*-* }
+** mulx_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fmulx   z0\.d, p0/m, z0\.d, z1\.d
 **     ret
index abfe0a0c056b0cf8e4192386b023114c0dff8d81..92e0664e6476264f3db4ab42994353b61d962240 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (nmad_h4_f16_x_tied2, svfloat16_t, __fp16,
                 z0 = svnmad_x (p0, z1, z0, d4))
 
 /*
-** nmad_h4_f16_x_untied: { xfail *-*-* }
+** nmad_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fnmla   z0\.h, p0/m, z1\.h, z2\.h
 **     ret
index ab86385c38224abc80a9c292d7f54d5bf85b1e1c..cef731ebcfe862070f9038b13c16ded37e5ae961 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (nmad_s4_f32_x_tied2, svfloat32_t, float,
                 z0 = svnmad_x (p0, z1, z0, d4))
 
 /*
-** nmad_s4_f32_x_untied: { xfail *-*-* }
+** nmad_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fnmla   z0\.s, p0/m, z1\.s, z2\.s
 **     ret
index c236ff5a1a18c94515d2eb11464b2c028c33e1e9..43b97c0de50ea6ef773ad3509ca2b748698b43bc 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (nmad_d4_f64_x_tied2, svfloat64_t, double,
                 z0 = svnmad_x (p0, z1, z0, d4))
 
 /*
-** nmad_d4_f64_x_untied: { xfail *-*-* }
+** nmad_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fnmla   z0\.d, p0/m, z1\.d, z2\.d
 **     ret
index f7ac377fdc287e7be88cb97124c3f1d61cc1f9fd..75d0ec7d3ab3a463d3bb3c144ef806abd0a0541d 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (nmla_h4_f16_x_tied2, svfloat16_t, __fp16,
                 z0 = svnmla_x (p0, z1, z0, d4))
 
 /*
-** nmla_h4_f16_x_untied: { xfail *-*-* }
+** nmla_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fnmad   z0\.h, p0/m, z2\.h, z1\.h
 **     ret
index ef9542d740595c2652b740a5d83c18315686ea23..da594d3eb955c31be180883602de254ce61a4740 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (nmla_s4_f32_x_tied2, svfloat32_t, float,
                 z0 = svnmla_x (p0, z1, z0, d4))
 
 /*
-** nmla_s4_f32_x_untied: { xfail *-*-* }
+** nmla_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fnmad   z0\.s, p0/m, z2\.s, z1\.s
 **     ret
index 441821f606b6e7eacccbf46f075cb7e33280d43d..73f15f417627b012a1ea557b5d0ef0b642793a39 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (nmla_d4_f64_x_tied2, svfloat64_t, double,
                 z0 = svnmla_x (p0, z1, z0, d4))
 
 /*
-** nmla_d4_f64_x_untied: { xfail *-*-* }
+** nmla_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fnmad   z0\.d, p0/m, z2\.d, z1\.d
 **     ret
index 8aa6c750970be000a22f31a5cfbd24517b24087d..ccf7e51ffc99986763b9de1ae706bf5a50860ed8 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (nmls_h4_f16_x_tied2, svfloat16_t, __fp16,
                 z0 = svnmls_x (p0, z1, z0, d4))
 
 /*
-** nmls_h4_f16_x_untied: { xfail *-*-* }
+** nmls_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fnmsb   z0\.h, p0/m, z2\.h, z1\.h
 **     ret
index 42ea13faca80142bcb801df6bdd90c10e17aba0a..10d345026f703c0ad62efe65ed7bdb60e05c340b 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (nmls_s4_f32_x_tied2, svfloat32_t, float,
                 z0 = svnmls_x (p0, z1, z0, d4))
 
 /*
-** nmls_s4_f32_x_untied: { xfail *-*-* }
+** nmls_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fnmsb   z0\.s, p0/m, z2\.s, z1\.s
 **     ret
index 994c2a74eeb9db05c556d32dd6d356f8533164bb..bf2a4418a9fe2667005feaf66371a50aa00a597a 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (nmls_d4_f64_x_tied2, svfloat64_t, double,
                 z0 = svnmls_x (p0, z1, z0, d4))
 
 /*
-** nmls_d4_f64_x_untied: { xfail *-*-* }
+** nmls_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fnmsb   z0\.d, p0/m, z2\.d, z1\.d
 **     ret
index c11401485225996ceb189596c0c9ae9b0084d2c6..5311ceb4408fefbc124ca642b55433e0b14298cb 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (nmsb_h4_f16_x_tied2, svfloat16_t, __fp16,
                 z0 = svnmsb_x (p0, z1, z0, d4))
 
 /*
-** nmsb_h4_f16_x_untied: { xfail *-*-* }
+** nmsb_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fnmls   z0\.h, p0/m, z1\.h, z2\.h
 **     ret
index c2204e040ee61478616783de59a51be2808f360c..6f1407a8717e45bfa43ff192648bcc81bd314d81 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (nmsb_s4_f32_x_tied2, svfloat32_t, float,
                 z0 = svnmsb_x (p0, z1, z0, d4))
 
 /*
-** nmsb_s4_f32_x_untied: { xfail *-*-* }
+** nmsb_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fnmls   z0\.s, p0/m, z1\.s, z2\.s
 **     ret
index 56592d3ae2e45a71ef15fcbbaa6d960299f51cc3..5e4e1dd7ea67919c5acc0a3567c885973acb01c2 100644 (file)
@@ -281,7 +281,7 @@ TEST_UNIFORM_ZD (nmsb_d4_f64_x_tied2, svfloat64_t, double,
                 z0 = svnmsb_x (p0, z1, z0, d4))
 
 /*
-** nmsb_d4_f64_x_untied: { xfail *-*-* }
+** nmsb_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fnmls   z0\.d, p0/m, z1\.d, z2\.d
 **     ret
index bf4a0ab1ef556e39a356fcd9d08d9e2716d0a6ef..48a57466f9d4808163cfc8a71c4deab6b7c33f6b 100644 (file)
@@ -336,7 +336,7 @@ TEST_UNIFORM_ZD (sub_h4_f16_x_tied1, svfloat16_t, __fp16,
                 z0 = svsub_x (p0, z0, d4))
 
 /*
-** sub_h4_f16_x_untied: { xfail *-*-* }
+** sub_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fsubr   z0\.h, p0/m, z0\.h, z1\.h
 **     ret
index 05be52bade8cc787594b9b494a1cc751beac3e37..32d57be9a356a4b9da134ce83eea31341f073296 100644 (file)
@@ -336,7 +336,7 @@ TEST_UNIFORM_ZD (sub_s4_f32_x_tied1, svfloat32_t, float,
                 z0 = svsub_x (p0, z0, d4))
 
 /*
-** sub_s4_f32_x_untied: { xfail *-*-* }
+** sub_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fsubr   z0\.s, p0/m, z0\.s, z1\.s
 **     ret
index 2179382c3f52e2e35588910fade10e998a1d206e..cdc25582649420e5c6ee87b31f64c899fa3c2c17 100644 (file)
@@ -336,7 +336,7 @@ TEST_UNIFORM_ZD (sub_d4_f64_x_tied1, svfloat64_t, double,
                 z0 = svsub_x (p0, z0, d4))
 
 /*
-** sub_d4_f64_x_untied: { xfail *-*-* }
+** sub_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fsubr   z0\.d, p0/m, z0\.d, z1\.d
 **     ret
index e14357db27f234ff86f6c499fae743a1f3bf2ef0..6929b286218412b35ee2a12a335a6a6ec69a0f66 100644 (file)
@@ -285,7 +285,7 @@ TEST_UNIFORM_ZD (subr_h4_f16_x_tied1, svfloat16_t, __fp16,
                 z0 = svsubr_x (p0, z0, d4))
 
 /*
-** subr_h4_f16_x_untied: { xfail *-*-* }
+** subr_h4_f16_x_untied:
 **     mov     z0\.h, h4
 **     fsub    z0\.h, p0/m, z0\.h, z1\.h
 **     ret
index 98dc7ad2b9778200bc9431dd4b0c8a1b56c3e8f7..5bf90a39145180a158a598663a32d27354b67881 100644 (file)
@@ -285,7 +285,7 @@ TEST_UNIFORM_ZD (subr_s4_f32_x_tied1, svfloat32_t, float,
                 z0 = svsubr_x (p0, z0, d4))
 
 /*
-** subr_s4_f32_x_untied: { xfail *-*-* }
+** subr_s4_f32_x_untied:
 **     mov     z0\.s, s4
 **     fsub    z0\.s, p0/m, z0\.s, z1\.s
 **     ret
index 81f1112d762b3cf4c3063e6427c4cf63b1ef78cc..7091c40bbb225f50c97c4769bf65a9b02109a07f 100644 (file)
@@ -285,7 +285,7 @@ TEST_UNIFORM_ZD (subr_d4_f64_x_tied1, svfloat64_t, double,
                 z0 = svsubr_x (p0, z0, d4))
 
 /*
-** subr_d4_f64_x_untied: { xfail *-*-* }
+** subr_d4_f64_x_untied:
 **     mov     z0\.d, d4
 **     fsub    z0\.d, p0/m, z0\.d, z1\.d
 **     ret