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

Dylan McKay via llvm-dev llvm-dev at lists.llvm.org
Sun Jan 17 22:41:33 PST 2016


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))

Which fails:

        Assertion failed: (Ops.size() >= NumSrcResults && "Didn't
provide enough results"), function EmitResultCode, file
/Users/dylanmckay/projects/llvm/avr-llvm/utils/TableGen/DAGISelMatcherGen.cpp,
line 989.

0  libLLVMSupport.dylib     0x0000000108e8c47e
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 46

1  libLLVMSupport.dylib     0x0000000108e8c8c9
PrintStackTraceSignalHandler(void*) + 25

2  libLLVMSupport.dylib     0x0000000108e89069
llvm::sys::RunSignalHandlers() + 425

3  libLLVMSupport.dylib     0x0000000108e8cc29 SignalHandler(int) + 345

4  libsystem_platform.dylib 0x00007fff947f5eaa _sigtramp + 26

5  libLLVMSupport.dylib     0x0000000108eafec9
llvm::sys::DynamicLibrary::Invalid + 9361

6  libLLVMSupport.dylib     0x0000000108e8c8eb raise + 27

7  libLLVMSupport.dylib     0x0000000108e8c9a2 abort + 18

8  libLLVMSupport.dylib     0x0000000108e8c981 __assert_rtn + 129

9  llvm-tblgen              0x000000010893f524 (anonymous
namespace)::MatcherGen::EmitResultCode() + 964

10 llvm-tblgen              0x000000010893e12f
llvm::ConvertPatternToMatcher(llvm::PatternToMatch const&, unsigned
int, llvm::CodeGenDAGPatterns const&) + 143

11 llvm-tblgen              0x0000000108927ca5 (anonymous
namespace)::DAGISelEmitter::run(llvm::raw_ostream&) + 3205

12 llvm-tblgen              0x0000000108926fd6
llvm::EmitDAGISel(llvm::RecordKeeper&, llvm::raw_ostream&) + 54

13 llvm-tblgen              0x0000000108a6dfc8 (anonymous
namespace)::LLVMTableGenMain(llvm::raw_ostream&, llvm::RecordKeeper&)
+ 328

14 libLLVMTableGen.dylib    0x0000000108fd7cb1
llvm::TableGenMain(char*, bool (*)(llvm::raw_ostream&,
llvm::RecordKeeper&)) + 2385

15 llvm-tblgen              0x0000000108a6de5b main + 91

16 libdyld.dylib            0x00007fff946fe5ad start + 1

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


More information about the llvm-dev mailing list