[LLVMdev] Pat operands matching example in ppc
Anitha B Gollamudi
anitha.boyapati at gmail.com
Sun Apr 7 01:19:24 PDT 2013
Hi,
How do "Pat" operands get matched? I am trying to follow the example given
in http://llvm.org/docs/CodeGenerator.html#selectiondag-process
In the latest trunk of ppcintrinfo.td following pattern is defined:
def : Pat<(pre_store i32:$rS, iPTR:$ptrreg, iaddroff:$ptroff),
(STWU $rS, iaddroff:$ptroff, $ptrreg)>;
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?
For reference[1] memri is defined as:
def memri :Operand<iPTR> { let PrintMethod = "printMemRegImm";
let MIOperandInfo = (ops dispRI:$imm, ptr_rc_nor0:$reg);
let EncoderMethod = "getMemRIEncoding";}
[1]
https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?view=markup
--
* Anitha*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130407/e6eb650a/attachment.html>
More information about the llvm-dev
mailing list