This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch to fix PR59959
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 30 Jan 2014 16:26:59 -0500
- Subject: patch to fix PR59959
- Authentication-results: sourceware.org; auth=none
The following patch fixes
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59959
The patch was successfully bootstrapped and tested on x86/x86-64 and
ppc64.
Committed as rev. 207323.
2014-01-30 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/59959
* lra-constrains.c (simplify_operand_subreg): Assign NO_REGS to
any reload of register whose subreg is invalid.
Index: lra-constraints.c
===================================================================
--- lra-constraints.c (revision 207322)
+++ lra-constraints.c (working copy)
@@ -1293,11 +1293,8 @@ simplify_operand_subreg (int nop, enum m
{
enum reg_class rclass;
- if (REG_P (reg)
- && curr_insn_set != NULL_RTX
- && (REG_P (SET_SRC (curr_insn_set))
- || GET_CODE (SET_SRC (curr_insn_set)) == SUBREG))
- /* There is big probability that we will get the same class
+ if (REG_P (reg))
+ /* There is a big probability that we will get the same class
for the new pseudo and we will get the same insn which
means infinite looping. So spill the new pseudo. */
rclass = NO_REGS;