This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
SUBREGs and modes
- To: gcc at gcc dot gnu dot org
- Subject: SUBREGs and modes
- From: Jan Hubicka <jh at suse dot cz>
- Date: Wed, 2 Aug 2000 14:49:16 +0200
- Cc: jakub at redhat dot com
Hi
(except for many other cases), my checker pointed out
weird usage of SUBREGs. According to my uderstanding the docs, when
WORDNUM is nonzero, the innermode must be greater than word and
the outer mode must be word.
My checker has caught occurences of subregs not matching these constraints
such as:
(subreg:HI (reg:DI ) 1)
in i386.
These happends in early stages of RTL generation and seems to be results of
combining two SUBREGS together. Simplifiers in recog.c and combine.c can't deal
with such SUBREGS when they get constant insode so we at least miss
optimizations.
So the question is, whether are such subregs correct, if so we
should probably docuemnt their semantics and add optimizations, if not,
how to avoid these?
Jakub: Does your (and Davids) SUBREG_BYTE work touch this issue somehow?
Honza