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: Fix selective scheduling failures on power6 [1/3]


Andrey Belevantsev wrote:
Hello,

This patch fixes a failure when compiling perl from SPEC CPU2k. The problem was that when the chosen destination register for an expression is the same as the existing register, we short-circuited the checks for validity of all insns that originated this expression with the chosen register. Obviously not all of the original insns will have the same register as the expression -- some of them can have different registers, and the check should still be made.

The fix is actually shorter than the explanation. There is a test reduced from SPEC code, I will include it in the commit if this is acceptable.

OK for trunk?
Andrey

2008-09-29 Andrey Belevantsev <abel@ispras.ru>

    * sel-sched.c (try_replace_dest_reg): When chosen register
    and original register is the same, do not bail out early, but
    still check all original insns for validity of replacing destination
    register.  Set EXPR_TARGET_AVAILABLE to 1 before leaving function
    in this case.



Andrey, the patch is ok to commit into the mainline.

Thanks.


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