<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Thomson</div><div><br></div><div>You'll run into trouble here if the register class of the vreg isn't compatible with that of the instruction generated which reads it. For example, you might have a vreg in an FP register bring read by an integer add. This would require that the CopyFromReg actually generate a cross class register copy to ensure this is valid code.</div><div><br></div><div>In SD you don't know which actual instruction is going to be generated until late so you won't have the information available to safely remove the copy. It's probably best to just leave it there to avoid any potential issues.</div><div><br></div><div>Thanks</div><div>Pete</div><div><br>Sent from my iPhone</div><div><br>On Jan 4, 2015, at 1:57 AM, Thomson <<a href="mailto:lilotom@gmail.com">lilotom@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">In the case SDNode <b>CopyFromReg </b>takes a virtual register and produces its value with type, is this node necessary to be generated for SelectionDAG? I tested some cases that ignores generating CopyFromReg and references the register Node directly also generates good code.<div><br></div><div>Cheers</div><div>Thomson</div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>LLVM Developers mailing list</span><br><span><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a></span><br><span><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></span><br></div></blockquote></body></html>