TableGen can do this if the second instruction uses the result of the first as an input, but not if they're completely separate like this. The output pattern must be in the form of a DAG.
You probably want to do this via a custom lowering and/or pseudo instructions that get expanded after isle.
I would like to be sure that Tablegen still does not support completely
separate multiple instruction generation, and the only way is to write
costume code (may be in TargetISelDAGToDAG class) to get the needed result.
Dear Tom, do you found other solution (using Tablegen tool) for this?
I would like to be sure that Tablegen still does not support completely
separate multiple instruction generation, and the only way is to write
costume code (may be in TargetISelDAGToDAG class) to get the needed result.
Dear Tom, do you found other solution (using Tablegen tool) for this?
I think the best way to do this is to use a pseudo instruction and then
expand it after instruction selection by using a custom inserter.
What is the advantage to use the “pseudo instruction” approach VS “custom lowering/DAGtoDAGSelection” VS “ Library function”?
It really depends on the instructions being lowered. If you are adding two
instructions where one has a chain and the other doesn't, it is much easier
to do it with pseudo instruction lowered using a custom inserter.
If you want both instruction to be glued together for the duration of
the program, then you will need to use a pseudo instruction and
expand it post-RA.
I've never tried to emit two unrelated instructions from a node with a single
result using DAGToDAGSelection, but I think it's theoretically possible
if you tied them together using glue.