This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/50340] [4.7 Regression] Fails to build SPEC 2000 176.gcc
- From: "amonakov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 09 Sep 2011 15:12:14 +0000
- Subject: [Bug rtl-optimization/50340] [4.7 Regression] Fails to build SPEC 2000 176.gcc
- Auto-submitted: auto-generated
- References: <bug-50340-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50340
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-09-09
CC| |amonakov at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |amonakov at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> 2011-09-09 15:12:14 UTC ---
Confirmed. When merging expr data of separable exprs with differing LHSes, we
can't claim we know anything about availability of the target register if the
other (unavailable) RHS is actually a different register.
The patch I'll test (courtesy of Andrey):
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index 4878460..b132392 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -1746,7 +1746,13 @@ update_target_availability (expr_t to, expr_t from,
insn_t split_point)
EXPR_TARGET_AVAILABLE (to) = -1;
}
else
- EXPR_TARGET_AVAILABLE (to) &= EXPR_TARGET_AVAILABLE (from);
+ if (EXPR_TARGET_AVAILABLE (from) == 0
+ && EXPR_LHS (from)
+ && REG_P (EXPR_LHS (from))
+ && REGNO (EXPR_LHS (to)) != REGNO (EXPR_LHS (from)))
+ EXPR_TARGET_AVAILABLE (to) = -1;
+ else
+ EXPR_TARGET_AVAILABLE (to) &= EXPR_TARGET_AVAILABLE (from);
}
}