summaryrefslogtreecommitdiff
path: root/gcc/local-alloc.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1997-04-03 15:08:40 -0800
committerJim Wilson <wilson@gcc.gnu.org>1997-04-03 15:08:40 -0800
commit8bb196585a6673cb5f3f82d98f89c21281877584 (patch)
treee88701a0cba537d8c6d50c443063325dc7cb750b /gcc/local-alloc.c
parent3dbc43d13a314775b13218b9180fb74059c18f53 (diff)
downloadgcc-8bb196585a6673cb5f3f82d98f89c21281877584.tar.gz
(no_conflict_p): Reject sequences with foreign insns.
From-SVN: r13838
Diffstat (limited to 'gcc/local-alloc.c')
-rw-r--r--gcc/local-alloc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index 6f9c796d93c..8e75aa80488 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -2364,8 +2364,12 @@ no_conflict_p (insn, r0, r1)
if (find_reg_note (p, REG_DEAD, r1))
ok = 1;
- if (reg_mentioned_p (r1, PATTERN (p))
- && ! find_reg_note (p, REG_NO_CONFLICT, r1))
+ /* There must be a REG_NO_CONFLICT note on every insn, otherwise
+ some earlier optimization pass has inserted instructions into
+ the sequence, and it is not safe to perform this optimization.
+ Note that emit_no_conflict_block always ensures that this is
+ true when these sequences are created. */
+ if (! find_reg_note (p, REG_NO_CONFLICT, r1))
return 0;
}