From 808ededc6f474450d3df665f24e8561f37af8d1b Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Fri, 30 Jan 2004 23:10:36 +0000 Subject: [PATCH] re PR rtl-optimization/12147 (Wrong code with -O2 in context of reload) PR optimization/12147 * reload1.c (reload_reg_free_p): RELOAD_OTHER conflicts with RELOAD_FOR_OPADDR_ADDR. (reload_reg_reaches_end_p): RELOAD_FOR_OTHER_ADDRESS register might be reused as RELOAD_FOR_OPADDR_ADDR register. From-SVN: r77003 --- gcc/ChangeLog | 8 ++++++++ gcc/reload1.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b201e508212..9431083cc46 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2004-01-30 Ulrich Weigand + + PR optimization/12147 + * reload1.c (reload_reg_free_p): RELOAD_OTHER conflicts with + RELOAD_FOR_OPADDR_ADDR. + (reload_reg_reaches_end_p): RELOAD_FOR_OTHER_ADDRESS register + might be reused as RELOAD_FOR_OPADDR_ADDR register. + 2004-01-30 Jan Hubicka * reload.c (get_secondary_mem): Fix updating of diff --git a/gcc/reload1.c b/gcc/reload1.c index 1df667e8f88..d53b27be6d6 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -4316,6 +4316,7 @@ reload_reg_free_p (unsigned int regno, int opnum, enum reload_type type) /* In use for anything means we can't use it for RELOAD_OTHER. */ if (TEST_HARD_REG_BIT (reload_reg_used_in_other_addr, regno) || TEST_HARD_REG_BIT (reload_reg_used_in_op_addr, regno) + || TEST_HARD_REG_BIT (reload_reg_used_in_op_addr_reload, regno) || TEST_HARD_REG_BIT (reload_reg_used_in_insn, regno)) return 0; @@ -4494,6 +4495,7 @@ reload_reg_reaches_end_p (unsigned int regno, int opnum, enum reload_type type) return 0; return (! TEST_HARD_REG_BIT (reload_reg_used_in_op_addr, regno) + && ! TEST_HARD_REG_BIT (reload_reg_used_in_op_addr_reload, regno) && ! TEST_HARD_REG_BIT (reload_reg_used_in_insn, regno) && ! TEST_HARD_REG_BIT (reload_reg_used, regno));