diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-26 22:03:47 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-26 22:03:47 +0000 |
commit | c0ed6498f13eab03219b506b6b369bd2d857a4fc (patch) | |
tree | 0b4b6309cb2c8c5e4a75beb4bca4b4058e10e2f4 /gcc/combine.c | |
parent | 2dac70124fcd83132c9d4a0b42050101a8d954a6 (diff) | |
download | gcc-c0ed6498f13eab03219b506b6b369bd2d857a4fc.tar.gz |
PR rtl-optimization/46878
* combine.c (insn_a_feeds_b): Check for the implicit cc0
setter/user dependency as well.
* gcc.dg/pr46878-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169307 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 3ee53e6ccd9..4fe71f33417 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1032,7 +1032,9 @@ clear_log_links (void) /* Walk the LOG_LINKS of insn B to see if we find a reference to A. Return true if we found a LOG_LINK that proves that A feeds B. This only works if there are no instructions between A and B which could have a link - depending on A, since in that case we would not record a link for B. */ + depending on A, since in that case we would not record a link for B. + We also check the implicit dependency created by a cc0 setter/user + pair. */ static bool insn_a_feeds_b (rtx a, rtx b) @@ -1041,6 +1043,10 @@ insn_a_feeds_b (rtx a, rtx b) for (links = LOG_LINKS (b); links; links = XEXP (links, 1)) if (XEXP (links, 0) == a) return true; +#ifdef HAVE_cc0 + if (sets_cc0_p (a)) + return true; +#endif return false; } |