[llvm-commits] [llvm] r155618 - in /llvm/trunk/lib/Target/X86: X86.td X86Subtarget.cpp

Pete Cooper pete.cooper at gmail.com
Sun Apr 29 22:19:04 PDT 2012


On Sat, Apr 28, 2012 at 5:07 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:

>
> On Apr 28, 2012, at 3:38 PM, Pete Cooper wrote:
>
> 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.
>
> 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.
>
> 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 :)
>
>
> You can handle MOV32r0 in X86InstrInfo::expandPostRAPseudo(), just like we
> do with the corresponding vector pseudos.
>
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-expandPostRAPseudo creation of this instruction
anywhere but that'd be easy enough to fix if there is.

Thanks,
Pete

>
> /jakob
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120429/f1eb0068/attachment.html>


More information about the llvm-commits mailing list