<div>So I think I have made some progress.<br></div><div><div>SDValue dupVal = consumer->getOperand(OpNo);</div><div>LoadSDNode *dupNode = (LoadSDNode*) dupVal.getNode();</div></div><div> </div><div>SDValue newLoad = CurDAG->getLoad(dupVal.getValueType(), dupVal.getDebugLoc(),</div>
<div> dupVal.getOperand(0), dupVal.getOperand(1),</div><div> dupNode->getPointerInfo(),</div><div> dupNode->isVolatile(), dupNode->isNonTemporal(),</div>
<div> dupNode->isInvariant(), dupNode->getAlignment(),</div><div> dupNode->getTBAAInfo(), dupNode->getRanges());</div><div>However, my problem now is that it will re-use the same load still. If I change something, like setting volatile to true for example, it will create a new node, but otherwise it will not. Any ideas?</div>
<div>-Joe</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 30, 2012 at 9:55 PM, Joseph Pusdesris <span dir="ltr"><<a href="mailto:joe@pusdesris.com" target="_blank">joe@pusdesris.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, I am writing an llvm target and I need both loads for isel reasons, but I am struggling to find the right way. I have been trying to use DAG.getLoad() to make a copy, then just change the operand in the consumers, but I cannot seem to get all of the arguments needed for that function in order to make the copy. Any help would be great, thanks!<div>
-Joe</div>
</blockquote></div><br></div>