public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR target/33474 ICE in bfin_adjust_cost
@ 2007-12-16 21:17 Rask Ingemann Lambertsen
  2007-12-18 13:15 ` Bernd Schmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-12-16 21:17 UTC (permalink / raw)
  To: gcc-patches

   bfin_adjust_cost() ICEs on an insn with a parallel:

 (parallel [
         (set (reg:PDI 33 A1)
             (mem/c:PDI (plus:SI (reg/f:SI 15 FP)
                     (const_int -16 [0xfffffff0])) [23 S8 A32]))
         (clobber (reg:SI 0 R0))
     ])

   This patch fixes it by extracting the SET inside the parallel. Tested by
building a cross compiler for bfin-unknown-elf and seeing that it now
compiles the file it choked on before. Ok for trunk?

2007-12-16  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	PR target/33474
	* config/bfin/bfin.c (bfin_adjust_cost): Dig into PARALLELs to find
	the SET.

Index: gcc/config/bfin/bfin.c
===================================================================
--- gcc/config/bfin/bfin.c	(revision 130561)
+++ gcc/config/bfin/bfin.c	(working copy)
@@ -3376,6 +3376,8 @@ bfin_adjust_cost (rtx insn, rtx link, rt
   if (dep_insn_type == TYPE_MOVE || dep_insn_type == TYPE_MCLD)
     {
       rtx pat = PATTERN (dep_insn);
+      if (GET_CODE (pat) == PARALLEL)
+	pat = XVECEXP (pat, 0, 0);
       rtx dest = SET_DEST (pat);
       rtx src = SET_SRC (pat);
       if (! ADDRESS_REGNO_P (REGNO (dest))


-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year

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

* Re: [PATCH] Fix PR target/33474 ICE in bfin_adjust_cost
  2007-12-16 21:17 [PATCH] Fix PR target/33474 ICE in bfin_adjust_cost Rask Ingemann Lambertsen
@ 2007-12-18 13:15 ` Bernd Schmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Bernd Schmidt @ 2007-12-18 13:15 UTC (permalink / raw)
  To: Rask Ingemann Lambertsen; +Cc: gcc-patches

Rask Ingemann Lambertsen wrote:

> 	PR target/33474
> 	* config/bfin/bfin.c (bfin_adjust_cost): Dig into PARALLELs to find
> 	the SET.

Ok, thanks.


Bernd
-- 
This footer brought to you by insane German lawmakers.
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif

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

end of thread, other threads:[~2007-12-18 11:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-16 21:17 [PATCH] Fix PR target/33474 ICE in bfin_adjust_cost Rask Ingemann Lambertsen
2007-12-18 13:15 ` Bernd Schmidt

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).