<div dir="ltr"><div><div>Hi,<br><br></div>  I have refined the patch. This bug is not caused by the live-in registers.  The root cause is that we are splitting machine basic block, and using physical registers across two machine basic blocks.  According to the document for register allocation, this will definitely result in errors in some cases.<br>
<br>  The revised patch includes a simple live variable analysis to compute the usage of physical registers that will be split to the new machine basic blocks, and then replace them with the virtual registers created at the end of original machine basic block.  Please have a look.  Thanks.<br>
<br></div><div>  BTW, maybe we should generalize this patch into something like MachineBasicBlock::SplitAt(...).  There are many code using similar patterns in ARMISelLowering.cpp (and so do other architectures).  Any ideas or comments from MachineBasicBlock experts?  Thanks.<br>
</div><div>


<br></div><div>Sincerely,<br>Logan<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 21, 2012 at 2:04 AM, Logan Chien <span dir="ltr"><<a href="mailto:tzuhsiang.chien@gmail.com" target="_blank">tzuhsiang.chien@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br></div>  After specifying the -verify-machineinstrs, I found my solution is not correct (live-ins should only specified for function entry or landing pads.)  I will try to come up with a correct patch ASAP.  Thanks.<span class="HOEnZb"><font color="#888888"><br>

<br></font></span></div><span class="HOEnZb"><font color="#888888">Logan</font></span><div class="im"><br> <br><div><div><div><div class="gmail_extra"><br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You may want to specify the CPU name in the test run line. It might be a good idea to specify -verify-machineinstrs as well. Otherwise the patch seems obvious to me.<br>


<div class="gmail_quote">
<br>
Evan<br>
<br>
Sent from my iPad<br></div></blockquote></div></div></div></div></div></div></div>
</blockquote></div><br></div>