public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Patch: fix SPEC regressions
@ 2002-10-28 11:40 Dale Johannesen
  2002-10-29  7:46 ` Richard Henderson
  2002-11-21 10:18 ` Patch: fix SPEC regressions Eric Botcazou
  0 siblings, 2 replies; 20+ messages in thread
From: Dale Johannesen @ 2002-10-28 11:40 UTC (permalink / raw)
  To: gcc-patches; +Cc: Dale Johannesen

This patch fixes the problems I ran into building SPEC on darwin last 
week.
(see description here):
http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01588.html
Bootstrapped and tested with no regressions.

Index: doloop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doloop.c,v
retrieving revision 1.25
diff -u -d -b -w -c -3 -p -r1.25 doloop.c
cvs server: conflicting specifications of output style
*** doloop.c    7 Oct 2002 17:55:46 -0000       1.25
--- doloop.c    28 Oct 2002 19:34:04 -0000
*************** doloop_modify_runtime (loop, iterations_
*** 683,694 ****
         if (shift_count < 0)
         abort ();

!       if (!loop_info->preconditioned)
         diff = expand_simple_binop (GET_MODE (diff), PLUS,
!                                   diff, GEN_INT (abs_loop_inc - 1),
                                     diff, 1, OPTAB_LIB_WIDEN);

!       /* (abs (final - initial) + abs_inc * unroll_number - 1)
          / (abs_inc * unroll_number)  */
         diff = expand_simple_binop (GET_MODE (diff), LSHIFTRT,
                                   diff, GEN_INT (shift_count),
--- 683,698 ----
         if (shift_count < 0)
         abort ();

!       /* (abs (final - initial) + abs_inc - 1) */
         diff = expand_simple_binop (GET_MODE (diff), PLUS,
!                                 diff, GEN_INT (abs_inc - 1),
                                   diff, 1, OPTAB_LIB_WIDEN);

!       diff = expand_simple_binop (GET_MODE (diff), PLUS,
!                                 diff, GEN_INT (abs_loop_inc - 
abs_inc),
!                                 diff, 1, OPTAB_LIB_WIDEN);
!
!       /* (abs (final - initial) + abs_inc - 1 + abs_inc * 
unroll_number - abs_inc)
          / (abs_inc * unroll_number)  */
         diff = expand_simple_binop (GET_MODE (diff), LSHIFTRT,
                                   diff, GEN_INT (shift_count),
Index: loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.429
diff -u -d -b -w -c -3 -p -r1.429 loop.c
cvs server: conflicting specifications of output style
*** loop.c      15 Oct 2002 14:38:10 -0000      1.429
--- loop.c      28 Oct 2002 19:34:04 -0000
*************** loop_invariant_p (loop, x)
*** 3273,3278 ****
--- 3273,3285 ----
           && REGNO (x) < FIRST_PSEUDO_REGISTER && call_used_regs[REGNO 
(x)])
         return 0;

+       /* Out-of-range regs can occur when we are called from 
unrolling.
+        These have always been created by the unroller and are set in
+        the loop, hence are never invariant. */
+
+       if (REGNO (x) >= regs->num)
+       return 0;
+
         if (regs->array[REGNO (x)].set_in_loop < 0)
         return 2;
  

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2002-12-21 20:34 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-28 11:40 Patch: fix SPEC regressions Dale Johannesen
2002-10-29  7:46 ` Richard Henderson
2002-10-29  9:40   ` Dale Johannesen
2002-10-29 10:38     ` Richard Henderson
2002-10-29 15:10       ` Dale Johannesen
2002-10-31 15:18         ` Richard Henderson
2002-10-31 15:22           ` Dale Johannesen
2002-10-31 17:41             ` Richard Henderson
2002-11-01 15:56               ` Patch: fix SPEC regressions (rewrite) Dale Johannesen
2002-11-03 15:32                 ` Richard Henderson
2002-11-21 10:18 ` Patch: fix SPEC regressions Eric Botcazou
2002-11-21 13:52   ` Richard Henderson
2002-12-14 14:48   ` Eric Botcazou
2002-12-17  5:35     ` Eric Botcazou
2002-12-19 13:15       ` Richard Henderson
2002-12-19 13:40         ` Eric Botcazou
2002-12-19 13:20       ` Richard Henderson
2002-12-21 12:34         ` Eric Botcazou
2002-12-21  4:16       ` Eric Botcazou
2002-12-21 11:19       ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).