This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [bugs] Another ICE
- To: Egbert Eich <eich at suse dot de>, gcc-patches at gcc dot gnu dot org, patches at x86-64 dot org, rth at cygnus dot com, amacleod at redhat dot com
- Subject: Re: [bugs] Another ICE
- From: Jan Hubicka <jh at suse dot cz>
- Date: Thu, 31 May 2001 17:51:12 +0200
- Cc: bugs at x86-64 dot org
- References: <15126.20392.667586.213222@deepthought.fra.suse.de>
Content-Description: message body text
>
> Hi Honza,
>
> I got another ICE with yesterday evenings version of gcc :-((
>
> Egbert.
>
Hi,
the bug is caused by gcse, that emits result of gen_move_insn and then update
basic block info for last insn. In case gen_move_insn used sequence of insns,
others are kept w/o any info.
(hmm, ugly - perhaps we can avoid gcse from using the BASIC_BLOCK_FOR_INSN
completely? I can't imagince case gcse is doing transformation and don't know
basic block information and keeping that array up-to-date is expensive)
Honza
Thu May 31 17:47:52 CEST 2001 Jan Hubicka <jh@suse.cz>
* gcse.c (update_ld_motion_stores): Handle sequences properly.
Index: gcse.c
===================================================================
RCS file: /home/cvs/Repository/gcc/gcc/gcse.c,v
retrieving revision 1.11
diff -c -3 -p -r1.11 gcse.c
*** gcse.c 2001/05/14 11:32:57 1.11
--- gcse.c 2001/05/31 14:47:18
*************** update_ld_motion_stores (expr)
*** 6384,6389 ****
--- 6381,6387 ----
rtx src = SET_SRC (pat);
rtx reg = expr->reaching_reg;
rtx copy, new;
+ rtx first;
/* If we've already copied it, continue. */
if (expr->reaching_reg == src)
*************** update_ld_motion_stores (expr)
*** 6399,6407 ****
}
copy = gen_move_insn ( reg, SET_SRC (pat));
new = emit_insn_before (copy, insn);
record_one_set (REGNO (reg), new);
! set_block_for_new_insns (new, BLOCK_FOR_INSN (insn));
SET_SRC (pat) = reg;
/* un-recognize this pattern since it's probably different now. */
--- 6397,6414 ----
}
copy = gen_move_insn ( reg, SET_SRC (pat));
+ first = PREV_INSN (insn);
new = emit_insn_before (copy, insn);
record_one_set (REGNO (reg), new);
!
! /* Update basic block numbers for insn emitted
! copy may be sequence) */
! while (first != new)
! {
! first = NEXT_INSN (first);
! set_block_for_new_insns (first, BLOCK_FOR_INSN (insn));
! }
!
SET_SRC (pat) = reg;
/* un-recognize this pattern since it's probably different now. */