This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Regression in unroll.c
- To: egcs-patches at cygnus dot com
- Subject: Regression in unroll.c
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Mon, 08 Jun 1998 11:18:13 +0100
- Cc: richard dot earnshaw at arm dot com
- Cc: kenner at vlsi1 dot ultra dot nyu dot edu
- Organization: Advanced RISC Machines Ltd.
- Reply-To: richard dot earnshaw at arm dot com
The gcc2 change of Mar 21 to verify_addresses (and merged into egcs)
causes a regression on the ARM (execute/920625-1.c) with -funroll-loops).
The problem is that verify_addresses was modified to use
validate_replace_rtx so that match_dups would be handled, but the
corresponding change to the undo at the end of the function wasn't made.
Since the comment asserts that the undo can't fail, I've also added an
abort to confirm this.
<date> Richard Earnshaw (rearnsha@arm.com)
* unroll.c (verify_addresses): Use validate_replace_rtx to undo the
changes. Abort if the undo fails.
Index: unroll.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/unroll.c,v
retrieving revision 1.23
diff -p -r1.23 unroll.c
*** unroll.c 1998/05/06 21:07:32 1.23
--- unroll.c 1998/06/08 10:06:33
*************** verify_addresses (v, giv_inc, unroll_num
*** 2664,2672 ****
|| ! validate_replace_rtx (*v->location, last_addr, v->insn))
ret = 0;
! /* Now put things back the way they were before. This will always
succeed. */
! validate_change (v->insn, v->location, orig_addr, 0);
return ret;
}
--- 2664,2673 ----
|| ! validate_replace_rtx (*v->location, last_addr, v->insn))
ret = 0;
! /* Now put things back the way they were before. This should always
succeed. */
! if (! validate_replace_rtx (*v->location, orig_addr, v->insn))
! abort ();
return ret;
}