This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR target/33474 ICE in bfin_adjust_cost

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

	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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]