<br><br><div class="gmail_quote">On Sat, Apr 28, 2012 at 5:07 PM, Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk" target="_blank">stoklund@2pi.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><br><div><div class="im"><div>On Apr 28, 2012, at 3:38 PM, Pete Cooper wrote:</div><br></div><div class="im"><blockquote type="cite"><span style="border-collapse:separate;font-family:Optima;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div class="gmail_extra">
I tracked down the difference in llc and lli which leads to a crash in one but not the other with these changes applied.  The llvm_unreachable i removed here from X86BaseInfo.h fires in lli because of a MOV32r0 instruction.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">The JIT passes this instruction all the way through to emission.  llc instead calls LowerUnaryToTwoAddr(OutMI, X86::XOR32rr); which stops any MOV32r0 instructions from ever getting to MC emission and triggering the llvm_unreachable.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Anyone got any advice on this?  We could have the JIT also make the LowerUnaryToTwoAddr call but without refactoring this is getting to be a mess of copied and pasted code.  Not that I helped that at all with this patch :)</div>
</span></blockquote></div></div><br><div>You can handle MOV32r0 in X86InstrInfo::expandPostRAPseudo(), just like we do with the corresponding vector pseudos.</div></div></blockquote><div><span class="Apple-style-span">Sounds good.  There is a FIXME on that instruction saying to turn it into a pseudo so this would enable that to be done too.  I'll need to check to make sure there's no post-</span>expandPostRAPseudo<span class="Apple-style-span"> creation of this instruction anywhere but that'd be easy enough to fix if there is.</span></div>
<div><span class="Apple-style-span"><br></span></div><div>Thanks,</div><div>Pete</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">
<span class="HOEnZb"><font color="#888888"><div><br></div><div>/jakob</div><div><br></div></font></span></div></blockquote></div><br>