[llvm-dev] Using `smullohi` in TableGen patterns

Matt Arsenault via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 18 02:34:24 PST 2016


> On Jan 17, 2016, at 22:41, Dylan McKay via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> I’m hitting TableGen errors trying to match the smullohi <lhs> <rhs> node in TableGen.
> 
> smullohi returns two results, which is the problem. I am not sure how to match against multiple results. The only other nodes to return two operands are umullohi, udivrem, and sdivrem. There are no examples of these in TableGen in tree.
> 
> The closest I can get is this:
> 
>         set (R1, R0, (umullohi GPR8:$lhs, GPR8:$rhs))

As far as I know, you cannot define a tablegen pattern with multiple results, and need to use C++ matching. I’m kind of surprised there are defined td nodes for these.

-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160118/ab142d18/attachment.html>


More information about the llvm-dev mailing list