This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: push_reload question
Date: Tue, 20 Oct 1998 10:59:17 +0200 (MET DST)
From: Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
I'm trying to understand (and then make readable) the huge if statements in
push_reload which handle SUBREGs. There appears to be a problem in the
first one of them. Consider the first line:
if (in != 0 && GET_CODE (in) == SUBREG && SUBREG_WORD (in) == 0
So the condition can only be true if SUBREG_WORD (in) == 0.
A little below, we find the following code:
/* The case where out is nonzero
is handled differently in the following statement. */
&& (out == 0 || SUBREG_WORD (in) == 0)
This condition therefore evaluates to 1 in all cases. Is this a bug,
does the out == 0 case really have to be handled differently?
The comment above this conditional states:
(However, if OUT is nonzero, we need to reload the reg *and*
the subreg, so do nothing here, and let following statement handle it.)
Looking at the "out != 0" cases two conditionals down, I would say the
"SUBREG_WORD(in)==0" is a bug and should be removed.
This area of the compiler is an utter rats nest full of hidden
treasure, thanks for working on cleaning it up. :-)
Later,
David S. Miller
davem@dm.cobaltmicro.com