Subject: Re: compiler bug (egcs-1.1.2)
To: Krister Walfridsson <email@example.com>
From: Matthias Drochner <firstname.lastname@example.org>
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 188.8.131.52
diff -u -p -r184.108.40.206 combine.c
--- combine.c 1999/04/06 15:07:39 220.127.116.11
+++ 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. */