<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Drear there:</div><div><br></div>The problem I have is  to lower an intrinsic function like this<div><b>”</b><div><b>float @llvm.write.arg(flaot %src, float* %dst)</b></div><div><b>“</b></div></div><div>I am lowering it with INTRINSIC_W_CHAIN,  so the return value and the value to write to dst are generated with some operations using src:</div><div><br></div><div><b>"</b></div><div><b> // it is the frame index node corresponding to input pointer</b></div><div><b>SDvalue frindex = Op.getoperand(3);</b></div><div><b>…</b></div><div><b>SDValue returnValue = DAG.getNode(myNode1, DL, VT….);</b></div><div><b><br></b></div><div><b>SDValue dstValue <span class="Apple-tab-span" style="white-space:pre">      </span>= DAG.getNode(myNode2, DL, VT….);</b></div><div><b><br></b></div><div><b>// to save the value to dst pointer, I think I need some call like </b></div><div><b>SDValue dstOut = DAG.getStore(chain, DL, dstValue, FrameIndex, MachinePointerInfo(), false, false, 0);</b></div><div><br></div><div>“</div><div>I have two questions here: </div><div>(1)  should I return some merges values( returnValue, DstValue) ? or only return returnValue is right? ( the dag dumped out  looks better if I return the merged values)</div><div>(2) How the FrameIndex should be computed? I use  DAG.getFrameIndex((dyn_cast<FrameIndexSDnode>( frindex.getNode()))->getIndex(), i32), not confident it is correct, any good examples to understand to this?</div><div><br></div><div>Best</div><div><br></div><div>Kevin</div></body></html>