<div dir="ltr"><div>Hi,<br><br><br></div>How do "Pat" operands get matched? I am trying to follow the example given in <a href="http://llvm.org/docs/CodeGenerator.html#selectiondag-process">http://llvm.org/docs/CodeGenerator.html#selectiondag-process</a><br clear="all">

<div><div><br></div><div>In the latest trunk of <a href="http://ppcintrinfo.td">ppcintrinfo.td</a> following pattern is defined:<br><br>def : Pat<(pre_store i32:$rS, iPTR:$ptrreg, iaddroff:$ptroff),<br>              (STWU $rS, iaddroff:$ptroff, $ptrreg)>;<br>

<br></div><div>I understand that input operand list i.e. ins of stwu should get matched with the given pre_store. But I am confused as to how  "ptroff" and "ptrreg" get matched with "memri" used in STWU?<br>

<br><br></div><div>For reference[1] memri is defined as:<br><br><table cellpadding="0" cellspacing="0"><tbody><tr class="" id="l386"><td class="">def memri :Operand<iPTR> {
</td>
</tr>




<tr class="" id="l387">
<td class=""></td><td class="">let PrintMethod = "printMemRegImm";
</td>
</tr>




<tr class="" id="l388">
<td class=""><br></td>

<td class="">  let MIOperandInfo = (ops dispRI:$imm,  ptr_rc_nor0:$reg);
</td>
</tr>




<tr class="" id="l389">
<td class=""><br></td>

<td class="">  let EncoderMethod = "getMemRIEncoding";</td></tr></tbody></table>}<br></div><div><br></div><div>[1] <a href="https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?view=markup">https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?view=markup</a><br>

</div><div>-- <br><i style="font-family:times new roman,serif"><b> Anitha</b></i><br>
</div></div></div>