This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
IA-64 patch for glibc 2.2 -O2 compile failure
- To: gcc-patches at gcc dot gnu dot org
- Subject: IA-64 patch for glibc 2.2 -O2 compile failure
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Fri, 07 Jul 2000 16:46:10 -0700
The glibc 2.2 file iso646.c gets an ICE at -O2. It hits the abort in
rws_access_reg because write_count is 4. The problem is that the code
doesn't correctly handle overlapping predicate register pairs. The
following patch fixes this.
2000-07-07 Jim Wilson <wilson@cygnus.com>
* config/ia64/ia64.c (rws_access_reg): New local write_count. If
is_predicate_reg, then take max write_count of register pair.
Index: ia64.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/ia64.c,v
retrieving revision 1.29
diff -p -r1.29 ia64.c
*** ia64.c 2000/07/01 21:20:32 1.29
--- ia64.c 2000/07/07 23:42:16
*************** rws_access_reg (regno, flags, pred)
*** 2313,2318 ****
--- 2313,2320 ----
if (flags.is_write)
{
+ int write_count;
+
/* One insn writes same reg multiple times? */
if (rws_insn[regno].write_count > 0)
abort ();
*************** rws_access_reg (regno, flags, pred)
*** 2327,2334 ****
is_predicate_reg = REGNO_REG_CLASS (regno) == PR_REGS;
if (is_predicate_reg)
rws_update (rws_insn, regno + 1, flags, pred);
! switch (rws_sum[regno].write_count)
{
case 0:
/* The register has not been written yet. */
--- 2329,2341 ----
is_predicate_reg = REGNO_REG_CLASS (regno) == PR_REGS;
if (is_predicate_reg)
rws_update (rws_insn, regno + 1, flags, pred);
+
+ /* ??? Likewise. */
+ write_count = rws_sum[regno].write_count;
+ if (is_predicate_reg)
+ write_count = MAX (write_count, rws_sum[regno + 1].write_count);
! switch (write_count)
{
case 0:
/* The register has not been written yet. */