custom lowering with multiple results

I may have found a solution to the problem. The attached patch seems to
do what I was trying to do.

It's a work-around, really. What I have done is split the READ_WORLD
node (inputs: Chain; outputs: Flag, Chain) into two nodes: READ_WORLD1
(inputs: Chain; outputs, i32, Chain), and READ_WORLD2 (inputs: i32;
outputs: Flag). The pair of nodes is matched by a single pattern in the
.td file.

Is it a known limitation that you can't have a single node that
operates on both Chain and Flag?

If not, perhaps it's a bug - something that has never been tested
before because none of the current back ends do this. If nobody tells
me it's a known limitation I'll probably try to write a cogent summary
and file a bug report.

read_world.patch (5.74 KB)

Hello Edmund,

Is it a known limitation that you can't have a single node that
operates on both Chain and Flag?

There are alot of examples of nodes with both chain and flag. You can
easily find them in .td files.
As an example - ordinary call is of such form.