re PR middle-end/88560 (armv8_2-fp16-move-1.c and related regressions after r266385)
authorVladimir Makarov <vmakarov@redhat.com>
Fri, 8 Feb 2019 19:01:10 +0000 (19:01 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Fri, 8 Feb 2019 19:01:10 +0000 (19:01 +0000)
2019-02-08  Vladimir Makarov  <vmakarov@redhat.com>

PR middle-end/88560
* lra-constraints.c (process_alt_operands): Don't increase reject
for memory when offset memory is required.

From-SVN: r268705

gcc/ChangeLog
gcc/lra-constraints.c

index 7bdcc07def1da8de830b047bf40f2084ab9e7ad9..9e5a140b0e12e0b26ca535eac48eaa85323df4cc 100644 (file)
@@ -1,3 +1,9 @@
+2019-02-08  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR middle-end/88560
+       * lra-constraints.c (process_alt_operands): Don't increase reject
+       for memory when offset memory is required.
+
 2019-02-08  Robin Dapp  <rdapp@linux.ibm.com>
 
        * config/s390/vector.md: Implement vector copysign.
index 3b975cc2c9ab405fb436cfc1cd4d38efff7db81c..17ea2c53bbc487ac9868c85b65814827afd1bcaf 100644 (file)
@@ -2796,29 +2796,32 @@ process_alt_operands (int only_alternative)
                              (GET_MODE (op), this_alternative, cl)))))
                losers++;
 
-             /* Input reloads can be inherited more often than output
-                reloads can be removed, so penalize output
-                reloads.  */
-             if (!REG_P (op) || curr_static_id->operand[nop].type != OP_IN)
-               {
-                 if (lra_dump_file != NULL)
-                   fprintf
-                     (lra_dump_file,
-                      "            %d Non input pseudo reload: reject++\n",
-                      nop);
-                 reject++;
-               }
-
              if (MEM_P (op) && offmemok)
                addr_losers++;
-             else if (curr_static_id->operand[nop].type == OP_INOUT)
+             else
                {
-                 if (lra_dump_file != NULL)
-                   fprintf
-                     (lra_dump_file,
-                      "            %d Input/Output reload: reject+=%d\n",
-                      nop, LRA_LOSER_COST_FACTOR);
-                 reject += LRA_LOSER_COST_FACTOR;
+                 /* Input reloads can be inherited more often than
+                    output reloads can be removed, so penalize output
+                    reloads.  */
+                 if (!REG_P (op) || curr_static_id->operand[nop].type != OP_IN)
+                   {
+                     if (lra_dump_file != NULL)
+                       fprintf
+                         (lra_dump_file,
+                          "            %d Non input pseudo reload: reject++\n",
+                          nop);
+                     reject++;
+                   }
+
+                 if (curr_static_id->operand[nop].type == OP_INOUT)
+                   {
+                     if (lra_dump_file != NULL)
+                       fprintf
+                         (lra_dump_file,
+                          "            %d Input/Output reload: reject+=%d\n",
+                          nop, LRA_LOSER_COST_FACTOR);
+                     reject += LRA_LOSER_COST_FACTOR;
+                   }
                }
            }