diff options
author | Maxim Kuvyrkov <maxim@codesourcery.com> | 2007-10-15 10:30:13 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <mkuvyrkov@gcc.gnu.org> | 2007-10-15 10:30:13 +0000 |
commit | 93b4b4cc8401829bd6be58f24ebaee00aecedb10 (patch) | |
tree | 10d9583a0f676cb45bcb0f35f9d784484c56e5d7 /gcc/haifa-sched.c | |
parent | 5c7c209b1f094110552c56f556ade12c20e58823 (diff) | |
download | gcc-93b4b4cc8401829bd6be58f24ebaee00aecedb10.zip gcc-93b4b4cc8401829bd6be58f24ebaee00aecedb10.tar.gz gcc-93b4b4cc8401829bd6be58f24ebaee00aecedb10.tar.bz2 |
re PR target/33133 (ICE in try_ready, at haifa-sched.c:2958 with -O2/-O3)
PR target/33133
* haifa-sched.c (process_insn_forw_deps_be_in_spec): Check if
speculation type of insn can be changed before trying to do that.
* gcc.c-torture/compile/pr33133.c: New test.
From-SVN: r129315
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r-- | gcc/haifa-sched.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 9d1f8b0..d366008 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -3292,8 +3292,17 @@ process_insn_forw_deps_be_in_spec (rtx insn, rtx twin, ds_t fs) due to backend decision. Hence we can't let the probability of the speculative dep to decrease. */ dep_weak (ds) <= dep_weak (fs)) - /* Transform it to be in speculative. */ - ds = (ds & ~BEGIN_SPEC) | fs; + { + ds_t new_ds; + + new_ds = (ds & ~BEGIN_SPEC) | fs; + + if (/* consumer can 'be in speculative'. */ + sched_insn_is_legitimate_for_speculation_p (consumer, + new_ds)) + /* Transform it to be in speculative. */ + ds = new_ds; + } } else /* Mark the dep as 'be in speculative'. */ |