"Bingfeng Mei" <b...@broadcom.com> writes:

> Could anyone explain to me what is difference between
> vec_shl_<vector_mode> and ashl<vector_mode>3 patterns? It seems to me
> that both shift a vector operand 1 with scalar operand 2.

The difference is that with a vector mode gcc will look for the standard
name vec_shl_MODE, and with a non-vector mode gcc will look for the
standard name lshlMODE or ashlMODE.

> I tried to understand some targets' implemenation, e.g., ia64 as
> follows, and cannot grasp their difference.

The name which matters is vec_shr_<mode>.  The fact that the ia64 names
the real insn <lshr>mode3 does not imply that that insn name is actually
used by anything.  vec_shr_<mode> is a define_expand which is expands
into a pattern which is recognized by the <lshr>mode3 insn.  The name of
the <lshr>mode3 insn could change or be removed and everything would
work.

Ian

Reply via email to