This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
PATCH: Re: ICE in 920624-1.c with -O3 -funroll-loops on vax-dec-ultrix4.3
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Cc: gcc-bugs at gcc dot gnu dot org, jh at suse dot cz, rth at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Tue, 15 Jan 2002 18:16:14 -0500 (EST)
- Subject: PATCH: Re: ICE in 920624-1.c with -O3 -funroll-loops on vax-dec-ultrix4.3
> The ICE occurs in verify_flow_info when it encounters a barrier. It appears
> that case insn's are being incorrectly simplified in the cse2 pass. This
> is the rtl from loop:
The ICE occurs because the original conditional jump gets converted to
an unconditional jump and a barrier is added after the jump. However,
the jump table data still remains in the rtl for the block. This
confuses the edge analysis into thinking that the block falls thru
and we have an inconsistent configuration.
This patch fixes the problem by deleting the jump table data when a
conditional or computed jump is converted to an unconditional jump.
I have verified that the patch fixes the original problem observed
under vax-dec-ultrix4.3. A new vax bootstrap is underway but it
won't finish until sometime next month.
Bootstrap checked with no regressions on i686-pc-linux-gnu and
hppa2.0w-hp-hpux11.11.
OK to install?
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2002-01-14 John David Anglin <dave@hiauly1.hia.nrc.ca>
* cse.c (cse_insn): Delete jump table data when a conditional or
computed jump is converted to an unconditional jump.
--- cse.c.orig Mon Jan 14 12:24:57 2002
+++ cse.c Mon Jan 14 17:48:32 2002
@@ -5767,9 +5767,19 @@
be a conditional or computed branch. */
else if (dest == pc_rtx && GET_CODE (src) == LABEL_REF)
{
- /* Now emit a BARRIER after the unconditional jump. */
- if (NEXT_INSN (insn) == 0
- || GET_CODE (NEXT_INSN (insn)) != BARRIER)
+ rtx next = NEXT_INSN (insn);
+ rtx tmp;
+
+ /* Delete jump table data if present. */
+ if (next != NULL_RTX
+ && LABEL_P (next)
+ && (tmp = NEXT_INSN (next)) != NULL_RTX
+ && JUMP_TABLE_DATA_P (tmp))
+ delete_insn (tmp);
+
+ /* Now emit a BARRIER after the unconditional jump. */
+ if (next == NULL_RTX
+ || GET_CODE (next) != BARRIER)
emit_barrier_after (insn);
/* We reemit the jump in as many cases as possible just in