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: vector operations and scalar operands


> On Sun, Feb 09, 2003 at 03:46:19PM +0100, Jan Hubicka wrote:
> > Hi,
> > the pattern:
> >   [(set (match_operand:V4HI 0 "register_operand" "=y")
> >         (ashiftrt:V4HI (match_operand:V4HI 1 "register_operand" "0")
> > 		       (match_operand:DI 2 "nonmemory_operand" "yi")))]
> > won't get simplified by my code as it expect vectors in all operands.
> > Some other places of i386.md does this with vectors:
> > 
> > (define_insn "mmx_uavgv4hi3"
> >   [(set (match_operand:V4HI 0 "register_operand" "=y")
> >         (ashiftrt:V4HI
> > 	 (plus:V4HI (plus:V4HI
> > 		     (match_operand:V4HI 1 "register_operand" "0")
> > 		     (match_operand:V4HI 2 "nonimmediate_operand" "ym"))
> > 		    (const_vector:V4HI [(const_int 1)
> > 					(const_int 1)
> > 					(const_int 1)
> > 					(const_int 1)]))
> > 	 (const_int 1)))]
> 
> Huh?  Both of these cases use a scalar as the rhs of a shift.

Hmm, I've missread the pattern.

> I think that makes sense.

Agreed.  I will teach simplify_rtx about this.

Honza
> 
> 
> r~


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