[llvm] r184834 - [PowerPC] Add extended rotate/shift mnemonics

Ulrich Weigand Ulrich.Weigand at de.ibm.com
Thu Jun 27 07:54:59 PDT 2013


Chris Lattner <clattner at apple.com> wrote on 27.06.2013 06:43:02:
> On Jun 26, 2013, at 5:18 AM, Ulrich Weigand <ulrich.weigand at de.ibm.com>
wrote:
> > I agree that it would be nicer if tablegen could generate this,
> > but I don't know off-hand how to fit this into the existing
> > AsmMatcher generator.  The logic there really fundamentally
> > handles one operand after the other; but for a transformation
> > like the above it is necessary to look at two incoming operands
> > at the same time.
>
> I haven't looked at this stuff in a while, but it seems possible to
> introduce something like SDNodeXForm that could allow custom
> transformations (e.g. negating a value) by running a specified
> function written in C++.

Well, for operating on just a single value, we can already define
custom functions to create the output operand (that's pretty much
what the RenderMethod of an AsmOperand is).  The problem is really
how to look at *two* operands at the same time, like in the
example above where one of the output operands needs to be the
sum of the two input operands ...

Bye,
Ulrich




More information about the llvm-commits mailing list