<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 28, 2012, at 3:38 PM, Pete Cooper wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Optima; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 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><br><div>You can handle MOV32r0 in X86InstrInfo::expandPostRAPseudo(), just like we do with the corresponding vector pseudos.</div><div><br></div><div>/jakob</div><div><br></div></body></html>