aboutsummaryrefslogtreecommitdiff
path: root/gcc/sel-sched-ir.c
diff options
context:
space:
mode:
authorAlexander Monakov <amonakov@ispras.ru>2011-10-19 12:46:44 +0000
committerAlexander Monakov <amonakov@ispras.ru>2011-10-19 12:46:44 +0000
commit6f9069c658528e76cb2f740b4b2b1201e7ead9e3 (patch)
tree431a3f95c56d18fcbb0c246f32e76182005871da /gcc/sel-sched-ir.c
parent036e54d3a7ad2860f76b31042366d6b06125c4e4 (diff)
2011-10-19 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/50340 * 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. * gcc.dg/pr50340.c: New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@180186 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sel-sched-ir.c')
-rw-r--r--gcc/sel-sched-ir.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index 4878460f882..dacee0b9e9b 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -1745,6 +1745,11 @@ update_target_availability (expr_t to, expr_t from, insn_t split_point)
else
EXPR_TARGET_AVAILABLE (to) = -1;
}
+ else 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);
}