This is the mail archive of the gcc@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: [i386] Scalar DImode instructions on XMM registers


Hi,
I am adding Vladimir and Richard into CC. I tried to solve similar problem
with FP math years ago by having -mfpmath=sse,i387. The idea was to allow
use of i387 registers when SSE ones run out and possibly also model the fact
that Pentium4 had faster i387 additions than SSE additions. I also had some
plans to extend this one mixed SSE/MMX/GPR integer arithmetics, but never
got to that.

This did not really fly becuase of the regalloc not really being able to
understnad it (I made path to regclass to propagate the classes and figure out
what operations needs to stay in i387 and what in SSE to avoid reloading, but
that never got in).

I believe Vladimir did some work on this with IRA (he is able to spill GPR
regs into SSE and do bit of other tricks).

Also I believe it was kind of Richard's design deicsion to avoid use of
(paradoxical) subregs for vector conversions because these have funny
implications.

The code for handling upper parts of paradoxical subregs is controlled by
macros around SUBREG_PROMOTED_VAR_P but I do not think it will handle
V1DI->V2DI conversions fluently without some middle-end hacking. (it will
probably try to produce zero extensions)

When we are on SSE instructions, it would be great to finally teach
copy_by_pieces/store_by_pieces to use vector instructions (these are more
compact and either equaly fast or faster on some CPUs). I hope to get into
this, but it would be great if someone beat me.

Honza

> 2015-04-24 13:27 GMT+03:00 Marc Glisse <marc.glisse@inria.fr>:
> > On Fri, 24 Apr 2015, Uros Bizjak wrote:
> >
> >> Please try to generate paradoxical subreg (V2DImode subreg of V1DImode
> >> pseudo). IIRC, there is some functionality in the compiler that is
> >> able to tell if the highpart of the paradoxical register is zeroed.
> >
> >
> > Those are not currently legal (I tried to change that)
> > https://gcc.gnu.org/ml/gcc-patches/2013-03/msg00745.html
> > https://gcc.gnu.org/ml/gcc-patches/2014-06/msg00769.html
> >
> > In this case, a subreg:V2DI of DImode should work.
> >
> > --
> > Marc Glisse
> 
> Thank you for you tips! It seems to work, will try and see what it
> gives us for i386.
> 
> Thanks,
> Ilya


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