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: Does vectorizer support extension?


On Mon, Apr 23, 2007 at 12:55:26AM +0300, Dorit Nuzman wrote:
> "H. J. Lu" <hjl@lucon.org> wrote on 23/04/2007 00:29:16:
> 
> > On Sun, Apr 22, 2007 at 11:14:20PM +0300, Dorit Nuzman wrote:
> > > "H. J. Lu" <hjl@lucon.org> wrote on 20/04/2007 18:02:09:
> > >
> > > > Hi Dorit,
> > > >
> > > > SSE4 has vector zero/sign-extensions like:
> > > >
> > > > (define_insn "sse4_1_zero_extendv2siv2di2"
> > > >   [(set (match_operand:V2DI 0 "register_operand" "=x")
> > > >         (zero_extend:V2DI
> > > >            (vec_select:V2SI
> > > >               (match_operand:V4SI 1 "nonimmediate_operand" "xm")
> > > >               (parallel [(const_int 0)
> > > >                          (const_int 1)]))))]
> > > >   "TARGET_SSE4_1"
> > > >   "pmovzxdq\t{%1, %0|%0, %1}"
> > > >   [(set_attr "type" "ssemov")
> > > >    (set_attr "mode" "TI")])
> > > >
> > > > Does vectorizer support them?
> > > >
> > >
> > > (sorry, I was away from email during Friday-Saturday) -
> > >
> > > so this looks like a vec_unpacku_hi_v4si (or _lo?), i.e. what is now
> > > modeled as follows in sse.md:
> > >
> > > (define_expand "vec_unpacku_hi_v4si"
> > >   [(match_operand:V2DI 0 "register_operand" "")
> > >    (match_operand:V4SI 1 "register_operand" "")]
> > >   "TARGET_SSE2"
> > > {
> > >   ix86_expand_sse_unpack (operands, true, true);
> > >   DONE;
> > > })
> > >
> >
> > I am not sure if they are the same since SSE4.1 instructions
> > extend the first 2 elements in the vector, not the high/low
> > parts.
> >
> 
> unpack high/low means the high/low elements of the vector
> 

SSE4.1 has

1.  The first 8 elements of V16QI zero/sign externd to V8HI.
2.  The first 4 elements of V16QI/V8HI zero/sign externd to V4SI.
2.  The first 2 elements of V16QI/V8HI/V4SI zero/sign externd to V2DI.


H.J.


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