aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPeter Bergner <bergner@linux.ibm.com>2019-04-18 22:14:17 +0000
committerPeter Bergner <bergner@gcc.gnu.org>2019-04-18 17:14:17 -0500
commit8503f963b046de1f40f9519643528a3fb8f82191 (patch)
treecd0418af53139a137f8dd617f15eccffc95c5dc2 /gcc
parent6c76c0e408765f43253b2457363978f8fd5ca6f3 (diff)
downloadgcc-8503f963b046de1f40f9519643528a3fb8f82191.zip
gcc-8503f963b046de1f40f9519643528a3fb8f82191.tar.gz
gcc-8503f963b046de1f40f9519643528a3fb8f82191.tar.bz2
re PR rtl-optimization/87871 (testcases fail after r265398 on arm)
PR rtl-optimization/87871 * ira-lives.c (make_object_dead): Don't add conflicts to TOTAL_CONFLICT_HARD_REGS for register ignore_reg_for_conflicts. From-SVN: r270448
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ira-lives.c22
2 files changed, 18 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3784ca2..c240c54 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-04-18 Peter Bergner <bergner@linux.ibm.com>
+
+ PR rtl-optimization/87871
+ * ira-lives.c (make_object_dead): Don't add conflicts to
+ TOTAL_CONFLICT_HARD_REGS for register ignore_reg_for_conflicts.
+
2019-04-18 Martin Sebor <msebor@redhat.com>
PR middle-end/89797
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c
index af5b821..faadf08 100644
--- a/gcc/ira-lives.c
+++ b/gcc/ira-lives.c
@@ -163,7 +163,9 @@ static void
make_object_dead (ira_object_t obj)
{
live_range_t lr;
+ int regno;
int ignore_regno = -1;
+ int ignore_total_regno = -1;
int end_regno = -1;
sparseset_clear_bit (objects_live, OBJECT_CONFLICT_ID (obj));
@@ -174,16 +176,14 @@ make_object_dead (ira_object_t obj)
&& REGNO (ignore_reg_for_conflicts) < FIRST_PSEUDO_REGISTER)
{
end_regno = END_REGNO (ignore_reg_for_conflicts);
- int src_regno = ignore_regno = REGNO (ignore_reg_for_conflicts);
+ ignore_regno = ignore_total_regno = REGNO (ignore_reg_for_conflicts);
- while (src_regno < end_regno)
+ for (regno = ignore_regno; regno < end_regno; regno++)
{
- if (TEST_HARD_REG_BIT (OBJECT_CONFLICT_HARD_REGS (obj), src_regno))
- {
- ignore_regno = end_regno = -1;
- break;
- }
- src_regno++;
+ if (TEST_HARD_REG_BIT (OBJECT_CONFLICT_HARD_REGS (obj), regno))
+ ignore_regno = end_regno;
+ if (TEST_HARD_REG_BIT (OBJECT_TOTAL_CONFLICT_HARD_REGS (obj), regno))
+ ignore_total_regno = end_regno;
}
}
@@ -192,8 +192,10 @@ make_object_dead (ira_object_t obj)
/* If IGNORE_REG_FOR_CONFLICTS did not already conflict with OBJ, make
sure it still doesn't. */
- for (; ignore_regno < end_regno; ignore_regno++)
- CLEAR_HARD_REG_BIT (OBJECT_CONFLICT_HARD_REGS (obj), ignore_regno);
+ for (regno = ignore_regno; regno < end_regno; regno++)
+ CLEAR_HARD_REG_BIT (OBJECT_CONFLICT_HARD_REGS (obj), regno);
+ for (regno = ignore_total_regno; regno < end_regno; regno++)
+ CLEAR_HARD_REG_BIT (OBJECT_TOTAL_CONFLICT_HARD_REGS (obj), regno);
lr = OBJECT_LIVE_RANGES (obj);
ira_assert (lr != NULL);