This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386]: Fix PR target/30970, take 2


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]