vector operations and scalar operands

Jan Hubicka jh@suse.cz
Sun Feb 9 22:56:00 GMT 2003


> 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~



More information about the Gcc mailing list