[PATCH] Fix PR17168 (DAG scheduler inserts DBG_VALUE before PHI with fast-isel)

Bill Schmidt wschmidt at linux.vnet.ibm.com
Thu Oct 17 21:34:36 PDT 2013


On Thu, 2013-10-17 at 21:08 -0700, Bill Wendling wrote:
> LGTM, but man, that test case is horrible!
> 

It really is, no question.  It's a bugpoint-reduced test from the bug
report, and the metadata is a huge enough mess that not much could be
done about it automatically.  I started trying to reduce the amount of
metadata by hand, but quickly realized my folly. :/

Thanks for the review!

Bill

> -bw
> 
> On Oct 2, 2013, at 1:10 PM, Bill Schmidt <wschmidt at linux.vnet.ibm.com> wrote:
> 
> > PR17168 describes a test case that fails when compiling for debug with
> > fast-isel.  Investigation showed that the test was failing because a
> > DBG_VALUE machine instruction was placed prior to a PHI.
> > 
> > For this problem to occur requires the following:
> > * Compile for debug
> > * Compile with fast-isel
> > * In a block B, fast-isel must partially succeed before punting to DAG-isel
> > * B must start with a PHI
> > * The first unhandled node in the DAG must not generate a machine instruction
> > * A debug value with an order less than that of that first node exists
> > 
> > When all of these circumstances apply, the existing test that an
> > instruction was not inserted won't fire.  Currently it tests whether the
> > block is empty, or whether the last instruction generated is a phi.
> > When fast-isel has partially succeeded, the last instruction generated
> > will not be a phi.  Instead, we need to check whether the current insert
> > position is immediately following a phi.  This patch adds that check,
> > and adds the test case from the PR as a regression test.
> > 
> > Tested on powerpc64-unknown-linux-gnu with no regressions.  Is this ok
> > to commit?
> > 
> > Thanks,
> > Bill
> > 
> > <pr17168-2013-10-02.patch>_______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 




More information about the llvm-commits mailing list