Unreviewed patch
Ulrich Weigand
weigand@i1.informatik.uni-erlangen.de
Mon Dec 1 20:27:00 GMT 2003
Zack Weinberg wrote:
> Could you provide a little more context? The code that causes the
> ICE, for instance, and an analysis of why this is the right fix.
Unfortunately I don't have a test case that triggers the ICE on
either mainline or 'vanilla' 3.3; we saw it when using a compiler
based on 3.3 with this mainline patch backported:
http://gcc.gnu.org/ml/gcc-patches/2003-07/msg01701.html
(With that compiler, the ICE showed in one of the SPECint apps.)
On vanilla 3.3 the problem doesn't show because in that particular
case the ext_dependant giv isn't recognized (without the patch above),
on CVS head it doesn't show because the old unroller isn't really
used any more.
I just thought it would be best to fix it as the fix appears
to be rather obvious, and the problem can conceivably show up
(in other cases) even in a vanilla 3.3 or else in CVS head when
using -fold-unroll-loops.
As to why this is the right fix, if you look at all the other
places in unroll.c (or loop.c) where the BIV initial value
is used in some computation involving a GIV, it is *always*
passed through extend_value_for_giv. This was initially
introduced by rth's patch
http://gcc.gnu.org/ml/gcc-patches/2000-09/msg00257.html
It looks like this was just forgotten at that one location,
and simply unnoticed until now because it's hard to trigger.
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de
More information about the Gcc-patches
mailing list