This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lno] symbolic number of iterations
- From: Roger Sayle <roger at eyesopen dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 30 May 2004 12:09:45 -0600 (MDT)
- Subject: Re: [lno] symbolic number of iterations
On Sun, 30 May 2004, Zdenek Dvorak wrote:
> + 2004-05-30 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
> +
> + * config/i386/i386.c (legitimate_constant_p): Do not allow
> + integer - symbol.
> +
> Index: config/i386/i386.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
> retrieving revision 1.425.2.39.2.5
> diff -c -3 -p -r1.425.2.39.2.5 i386.c
> *** config/i386/i386.c 27 May 2004 14:35:09 -0000 1.425.2.39.2.5
> --- config/i386/i386.c 30 May 2004 09:22:13 -0000
> *************** legitimate_constant_p (rtx x)
> *** 5823,5829 ****
> && tls_symbolic_operand (XEXP (inner, 0), Pmode))
> return false;
>
> ! if (GET_CODE (inner) == PLUS)
> {
> if (GET_CODE (XEXP (inner, 1)) != CONST_INT)
> return false;
> --- 5823,5830 ----
> && tls_symbolic_operand (XEXP (inner, 0), Pmode))
> return false;
>
> ! if (GET_CODE (inner) == PLUS
> ! || GET_CODE (inner) == MINUS)
> {
> if (GET_CODE (XEXP (inner, 1)) != CONST_INT)
> return false;
>
This is probably more clearly written as
if (GET_CODE (inner) == PLUS)
...
else if (GET_CODE (inner) == MINUS)
return false;
The second operand to a MINUS_EXPR rtx should never be a CONST_INT.
It's also a minor thing, but we should also start to transition
the LNO branch from "build" to "buildN", and from "convert" to
"fold_convert" even if only for new code initially.
Roger
--