Subject: Re: compiler bug (egcs-1.1.2)
To: Krister Walfridsson <firstname.lastname@example.org>
From: Matthias Drochner <email@example.com>
Date: 08/27/1999 17:21:44
> This problem is present for most (all?) archs, and has been for a long
> time (at least since gcc-2.7)
The egcs people came up with the appended fix. The log message is
* combine.c (get_last_value): Don't look for earlier sets if the last
known set is somewhere in between the insns being combined.
Just tried - it makes the test program work correctly on i386 and mipsel.
Should it be applied to our tree (and perhaps to the release branch(es))?
RCS file: /cvsroot/gnusrc/gnu/dist/gcc/combine.c,v
retrieving revision 184.108.40.206
diff -u -p -r220.127.116.11 combine.c
--- combine.c 1999/04/06 15:07:39 18.104.22.168
+++ combine.c 1999/08/27 15:07:17
@@ -10824,6 +10824,11 @@ get_last_value (x)
rtx insn, set;
+ /* We can't do anything if the value is set in between the insns we are
+ processing. */
+ if (INSN_CUID (reg_last_set[regno]) <= INSN_CUID (subst_insn))
+ return 0;
/* We can not do anything useful in this case, because there is
an instruction which is not on the insn chain. */