This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Fix PR target/30970, take 2
- From: Ian Lance Taylor <iant at google dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>
- Date: 27 Feb 2007 07:12:54 -0800
- Subject: Re: [PATCH, i386]: Fix PR target/30970, take 2
- References: <45E42C83.1000602@gmail.com>
Uros Bizjak <ubizjak@gmail.com> writes:
> The addition to this patch is corrected MODES_TIEABLE_P functionality
> for i386 targets. The problem is, that lower-subreg pass checks
> MODES_TIEABLE_P if the XMM register can be splitted into word_mode
> (DImode) _without_copying_.
Well, yeah, that's what MODES_TIEABLE_P means. But lower-subreg.c is
trickier than most uses because it uses MODES_TIEABLE_P to indicate
not just whether the low part can be accessed cheaply in a different
mode, but also whether the high part can. If we have a hard register
we can call validate_subreg, but unfortunately with a pseudo-reg we
don't currently have any way to precisely determine whether the low
and high parts of the register are accessible in MODE without copying.
I guess one possibility would be to locate a non-fixed hard reg which
can hold the large mode in question and then call validate_subreg for
each word position (as in can_decompose_p).
Anyhow, your patch seems OK to me, though I wonder whether you will
get worse register allocation in some cases for code which extracts
the first float from a vector of floats. Of course those cases are
not very common.
Thanks for looking into this.
Ian