This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SUBREGs and modes
Jan Hubicka <jh@suse.cz> writes:
> Don't know - perhaps it would be better to wait for the SUBREG_BYTE
> patches. The prbolem I am having is that we prohibit SUBREGs of
> const_int s lurking around the RTL stream and currently gcse is
> creating them, since it fails to simplify the SUBREGs of constants
> substitued to registers with NON-SImode and WORDNUM nonzero. This
> also disables any const propagation on these beast too - in the CSE,
> gcse and combine :(
Actually, we don't. It used to be that when cross-compiling you could
get constructs like:
(subreg:SF (const_int 0x40800000) 0)
but a patch I committed about two weeks ago causes this case to only
happen when the FP emulator is not in use, which at present only
happens on VMS.
Now, I wouldn't _recommend_ such things. As you've noticed, it hurts
optimisation. gen_lowpart_common is the routine that knows how to fix
them.
Also, the reason for the patch is that PREFERRED_RELOAD_CLASS doesn't
work properly in the presence of such subregs, and it was easier to
ban them than to fix it.
--
- Geoffrey Keating <geoffk@cygnus.com>