<div dir="ltr"><div><div><div><div><div>Is it possible to get a register number to which the value is allocated to in MIPS in DAGToDAG class?<br><br></div>More Specifically:<br>                    SDValue Reg3 = Node->getOperand(3);   <br>                    if (RegisterSDNode *R = dyn_cast<RegisterSDNode>(Reg3))<br>                    {<br>                        op3 = cast<RegisterSDNode>(Reg3)->getReg();<br>                        fprintf(stderr,"Op3 is register and regnum is %d\n",op3);<br>                    }<br>                    else if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Reg3))<br>                    {<br>                        op3 = C->getZExtValue();   <br>                        fprintf(stderr,"Op3 is constant and value is %d\n",op3);             <br>                    }<br><br></div>When I run this code Reg3 is found out to be a ConstantSDNode but is stored in the register in assembly. I want to store the value in register but also need the  register number to which the value is allocated.<br></div><br></div>Thanks,<br></div>Ambuj Agrawal<br></div>