[PATCH] Fix PR target/33474 ICE in bfin_adjust_cost
Rask Ingemann Lambertsen
rask@sygehus.dk
Sun Dec 16 21:17:00 GMT 2007
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
More information about the Gcc-patches
mailing list