SDNode *node = ... unsigned operandIndex = ... SDValue result = SDValue::getOperand(node, operandIndex);
SelectionDAG &dag = ... SDLoc dl = ... SDValue op1 = ... SDValue op2 = ... SDValue result = dag.getNode(ISD::ADD, dl, op1.getValueType(), op1, op2);This code constructs a new node in the graph representing the addition of two operands (op1 and op2), using the SelectionDAG object (dag) and a location in the program (dl). The result is returned as an SDValue. Package/library: LLVM Core Libraries.