This is the mail archive of the gcc-patches@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: Problem exposed by recent ARM multiply changes


On Thu, Sep 26, 2019 at 03:27:50PM -0600, Jeff Law wrote:
> > Some machines support a multiplication that generates a product wider
> > than the operands.  Write the pattern for this as
> > 
> > @smallexample
> > (mult:@var{m} (sign_extend:@var{m} @var{x}) (sign_extend:@var{m} @var{y}))
> > @end smallexample
> > 
> > where @var{m} is wider than the modes of @var{x} and @var{y}, which need
> > not be the same.
> ^^^ this clause.  I read this as x & y being able to vary relative to
> each other.  But I think you're reading it as x & y are the same, but
> they can vary relative to m

This talks about the mult with sign_extend operands, and in that case
sure, x can have different mode from y, the only restriction is that
the modes are scalar integral (otherwise sign_extend isn't valid) and that
they are narrower than m.  But, the mult still has both operands as well as
result with the same mode m, x and y aren't operands of mult in that case,
but of the sign_extends.

	Jakub


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