On 09/13/2011 12:42 PM, Alexander Monakov wrote:
Fixed as follows, bootstrapped and regtested on x86_64-linux and ia64-linux (without java, with one recent SRA patch reverted to unbreak bootstrap) with sel-sched enabled at -O2. OK for trunk?
Ok with a small code format change below.
(a small testcase is not available at the moment, but I can try to produce one using delta before committing) 2011-09-13 Andrey Belevantsev<a...@ispras.ru> * sel-sched-ir.c (update_target_availability): LHS register availability is not known if the unavailable LHS of the other expression is a different register. diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 4878460..b132392 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -1746,7 +1746,13 @@ update_target_availability (expr_t to, expr_t from, insn_t split_point) EXPR_TARGET_AVAILABLE (to) = -1; } else - EXPR_TARGET_AVAILABLE (to)&= EXPR_TARGET_AVAILABLE (from);
Please, put else and if on the same line with a proper indentation.
+ if (EXPR_TARGET_AVAILABLE (from) == 0 +&& EXPR_LHS (from) +&& REG_P (EXPR_LHS (from)) +&& REGNO (EXPR_LHS (to)) != REGNO (EXPR_LHS (from))) + EXPR_TARGET_AVAILABLE (to) = -1; + else + EXPR_TARGET_AVAILABLE (to)&= EXPR_TARGET_AVAILABLE (from); } }