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

Matt Arsenault via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 18 03:19:09 PST 2016


> On Jan 18, 2016, at 02:48, Dylan McKay <dylanmckay34 at gmail.com> wrote:
> 
> > 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.
> 
> Yes they were added a while ago, but never used.

I vaguely remember some patches to add support for multiple results, but I’m not sure this was ever finished.

> 
> If I write a C++ matcher, will the register allocator work correctly? The multiplication instruction I'm working with always writes the result to registers `R1` and `R0`, but if that logic is in C++, how will the regallocator know?

The pattern isn’t really related to the machine instruction’s operand definition. The multiple operands will each be defs.

-Matt

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


More information about the llvm-dev mailing list