Unknown Target Node


Could you please explain how you are using this? like commands

When I run this IR in opt, it doesn't throw any errors.

The error he's reporting is from CodeGen, so opt would never be able
to reproduce it (you'd have to use llc). I haven't tried, but the
input is so basic I assume it's also from a private backend.

Unfortunately I can only speculate about the cause. LLVM doesn't
usually even try to select machine nodes, so the best idea I've come
up with is that some custom selection code is both modifying the DAG
and then reporting failure to select. The key questions Josh needs to
look into are:

  + Is this node there in -view-isel-dags (i.e. before selection)?
  + If not, what creates it (this'll probably involve looking at
build/lib/Target/XYZ/XYZGenInstrInfo.inc to work out what 284 is.

Calls are pretty special at the best of times, but I can't think of a
way they could cause this.


I'm still relatively new to llvm, good to know these errors are from CodeGen.

I think “Unknown Target Node” is a target specific ISD opcode. A machine node would be “Unknown Machine Node”. Assuming I’m reading SDNode::getOperationName correctly.

Josh, you should make sure all you target specific ISD opcodes are handled in your *TargetLowering::getTargetNodeName method.

I would recommend adding -debug-only=isel to the command line. It will show you the selection DAG before and during ISEL. You can then decipher what that target-dependent node is and what patterns ISEL has tried before giving up.