<div style="font-size: 12pt; font-family: Calibri,sans-serif;"><div>Hi Dmitri,</div><div><br></div><div>If you have such a simple intrinsic which operates on a single register, just lower the intrinsic to a target specific node which is only implemented by a single instruction. Like you were doing before and by using a chain operand. Hard code the instruction to use and define the global register and only pass the instruction the actual variable argument.</div><div><br></div><div>Hope that helps,</div><div>Sam</div><div><br></div><div>Sam Parker</div><div>Research Student</div><div>Electronic Systems Design Group</div><div>School of Electronic, Electrical and Systems Engineering</div><div>Loughborough University</div><br><div id="htc_header">----- Reply message -----<br>From: "Dmitri Kovalenko" <dmitri.a.kovalenko@gmail.com><br>To: <llvmdev@cs.uiuc.edu><br>Subject: [LLVMdev] understanding DAG: node creation<br>Date: Sat, Aug 30, 2014 22:18</div></div><br><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div>
<p>I have an intrinsic and it must be lowered to instruction, which works with fixed register.<br>
So, it takes contents of this register and another argument as input.
After execution, the result of the instruction is placed into that same
fixed register.</p>
<p>What should I do in <code>SelectionDAGBuilder::visitIntrinicCall</code> to describe such behaviour for a SDNode?<br></p><p>Thank you for the ideas and insights.<br clear="all"></p></div>-- <br><div>Sincerely,</div><div>
Dmitri Kovalenko</div>
</div>