This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Regression due to tree loop opt / expand weirdness
- From: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: weigand at i1 dot informatik dot uni-erlangen dot de, gcc at gcc dot gnu dot org
- Date: Wed, 6 Oct 2004 15:52:19 +0200 (CEST)
- Subject: Re: Regression due to tree loop opt / expand weirdness
Richard Kenner wrote:
> Would changing the test in expand_expr_addr_expr from
>
> if (!target.valid_pointer_mode (tmode))
>
> to
>
> if (tmode != Pmode && tmode != ptr_mode)
>
> be OK with you? This should cause no change to ia64 ...
>
> That looks wrong to me. On ia64, Pmode is always DImode, but ptr_mode can
> be either SImode or DImode depending on the *default* pointer size for
> the configuration. But we want to support both 32-bit and 64-bit pointers
> for IA64 on at least some configurations (e.g., VMS) no matter what the
> default is.
>
> The target.valid_pointer_mode test does exactly the right thing and seems
> to me to be the only thing that does.
First of all, the above change is provably a no-op on ia64 since
the valid_pointer_mode implementation on ia64 is the default one,
which is exactly (mode != Pmode && mode != ptr_mode).
In addition, if you look further down in expand_expr_addr_expr,
tmode is passed as argument to convert_memory_address, and this
routine by design allows only Pmode and ptr_mode as target mode.
If we pass in anything else, we get ICEs -- which is exactly
the problem I had. So if we indeed need to allow more modes at
some point, this will require much more extensive changes than
just this if condition.
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de