This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [testsuite] XFAIL for dg-debug testsuite


> Richard Henderson mentioned earlier that this worked on the alpha; I
> looked at why.  The alpha has the return register r0 in a class by
> itself R0_REGS.  This causes CLASS_LIKELY_SPILLED_P to be true, which
> prevents combine from merging the conditional move with the instruction
> that stores the result in the return register.  The alpha is thus left
> with two instructions, one of which is in the body, and gets the debug
> info.  However, on the sparc, the return register is not in a class by
> itself, combine merges the two instructions, and we are left with one
> instruction that sets the return register.  There is no instruction in
> the body, and no debug info for the variable.

Thanks for taking the time to dig that deeply!

> We can fix this if we make sure that we have at least one other
> instruction.  One way to do that is to modify the testcase so that p is
> a global instead of a parameter.  We thus need a load instruction.  The
> other optimizations all occur as before, the block is optimized into a
> conditional move.  Except this time the testcase works because the load
> is left in the body, and we get the debug info for the sparc.
>
> If this is undesirable for some reason, then the testsuite patch you
> proposed is OK.

I think our policy is not to tweak testcases.  That said, if Richard wants to 
make an exception (or let me replace them by debug-[78].c), I think this 
would be more elegant than once again hacking the testsuite driver.

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]