<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
> otherwise how are the machine instructions being accessed/matched for instruction selection ?<br>
><br>
<br>
</div>Have a look at the code in SelectionDAGISel.<br><br></blockquote><div><br></div><div style="color:rgb(68,68,68);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I am looking at the ARM backend.</div>
<div style="color:rgb(68,68,68);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">In specific, the instruction selection. </div><div style="color:rgb(68,68,68);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
In Select(N), I only see ad-hoc matches on the basis of the opcode in the provided SDNode of the DAG, and then getMachineNode() is being used to generate the machine instruction.</div><div style="color:rgb(68,68,68);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Am I understanding this correctly ?    </div><div style="color:rgb(68,68,68);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(68,68,68);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Consider the following multiply add insstruction, given in ARMInstrInfo.td </div><div style="color:rgb(68,68,68);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(68,68,68);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<div>def MLA  : AsMul1I32<0b0000001, (outs GPR:$Rd), (ins GPR:$Rn, GPR:$Rm, GPR:$Ra),</div><div>                    IIC_iMAC32, "mla", "\t$Rd, $Rn, $Rm, $Ra",</div><div>                   [(set GPR:$Rd, (add (mul GPR:$Rn, GPR:$Rm), GPR:$Ra))]></div>
</div><div style="color:rgb(68,68,68);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(68,68,68);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
How do I get this instruction and it corresponding pattern in the selector ?</div><div style="color:rgb(68,68,68);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div><span style="background-color:rgb(255,255,255);color:rgb(68,68,68);font-family:arial,sans-serif;font-size:13px">-Omer </span> </div>
</div>