[LLVMdev] custom lowering with multiple results
Anton Korobeynikov
anton at korobeynikov.info
Sun Sep 26 04:24:49 PDT 2010
Hello, Edmund
> Here's a concrete example of what I'm having problems with:
> trying to use LowerOperation to replace one node with two nodes.
I don't see any problem with such usage. There are a lot of examples
in the current codebase for this.
> clang: InstrEmitter.cpp:667: ...
> "#operands for dag node doesn't match .td file!"' failed.
Well... You created a node with wrong number of operands. Check how
you created stuff and declared in .td.
In your case:
- for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) {
+ for (unsigned i = 0, e = Tmp1->getNumValues(); i != e; ++i) {
This hunks looks potentially invalid
And how do you handle chain for your node? You can just gdb at the
place of the assertion and check the expected and provided # of
operands.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the llvm-dev
mailing list