aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@redhat.com>2001-08-13 21:42:10 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2001-08-13 21:42:10 +0000
commiteb296bd9be728bfa4e4d6ce9ac155311b44c390e (patch)
tree67db55b577664933343452abfc88f580be673b9e /gcc/gcse.c
parent586b870d4f0b3693628e22c2aaeeb26dc29b5342 (diff)
downloadgcc-eb296bd9be728bfa4e4d6ce9ac155311b44c390e.zip
gcc-eb296bd9be728bfa4e4d6ce9ac155311b44c390e.tar.gz
gcc-eb296bd9be728bfa4e4d6ce9ac155311b44c390e.tar.bz2
gcse.c (hash_scan_set): Expressions that are set as part of jump instructions are not available.
* gcse.c (hash_scan_set): Expressions that are set as part of jump instructions are not available. From-SVN: r44872
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 0c1bc3c..8164ee3 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -2191,8 +2191,11 @@ hash_scan_set (pat, insn, set_p)
this insn. */
int antic_p = oprs_anticipatable_p (src, insn) && single_set (insn);
/* An expression is not available if its operands are
- subsequently modified, including this insn. */
- int avail_p = oprs_available_p (src, insn);
+ subsequently modified, including this insn. It's also not
+ available if this is a branch, because we can't insert
+ a set after the branch. */
+ int avail_p = (oprs_available_p (src, insn)
+ && ! JUMP_P (insn));
insert_expr_in_table (src, GET_MODE (dest), insn, antic_p, avail_p);
}