[llvm-commits] [llvm] r149597 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/uint64-to-float.ll

Lang Hames lhames at gmail.com
Thu Feb 2 18:46:33 PST 2012


Many helpful suggestions incorporated in r149655. Thanks guys!

- Lang.

On Thu, Feb 2, 2012 at 11:38 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:

>
> On Feb 2, 2012, at 11:26 AM, Evan Cheng wrote:
>
> >>> +  // We found a def, or hit the end of the basic block. SelectMI
> should have a
> >>> +  // kill flag on EFLAGS.
> >>
> >> Not so fast! What if EFLAGS is live out of the block?
> >
> > I don't think that's possible at isel time, right?
>
> It's not, but the very same code goes:
>
> >>> +    if (!shouldHaveEFlagsKill(MI, BB)) {
> >>> +      copy0MBB->addLiveIn(X86::EFLAGS);
> >>> +      sinkMBB->addLiveIn(X86::EFLAGS);
> >>> +    }
>
> I think it all works out because this pass is scanning forward through the
> instructions. The new blocks with live-in EFLAGS are always behind the
> current position.
>
> There should at least be a comment, and preferably an assertion, though.
>
> BTW, this no longer happens as part of ISel, but in the ExpandISelPseudos
> pass that runs right after ISel. If someone ran MachineCSE or
> MachineSinking first, your assertion would no longer be true.
>
> /jakob
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120202/079f287d/attachment.html>


More information about the llvm-commits mailing list