I added a StandardPseudoInstruction in Target.td file and created a MachineNode for this instruction using getMachineNode(…) function in SelectionDAGBuilder.cpp file. I am getting a crash because llvm is not able to promote integer-type operands of my MachineNode during the type legalization phase.
1.Can someone please guide me to the file where type legalization for MachineNode takes place? So far, all the code I’ve seen handles the nodes mostly from ISD::NodeType enum, but I haven’t added my node in that enum.
2.Do I have to add my node in that enum and then write code for legalization?