Commit 5c2917ec by DJ Delorie Committed by DJ Delorie

re PR rtl-optimization/46878 (V850 ICE in in maybe_add_or_update_dep_1, at sched-deps.c:854)

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.

From-SVN: r169307
parent 81cce6f6
2011-01-26 DJ Delorie <dj@redhat.com>
PR rtl-optimization/46878
* combine.c (insn_a_feeds_b): Check for the implicit cc0
setter/user dependency as well.
2011-01-26 Eric Botcazou <ebotcazou@adacore.com> 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/44469 PR rtl-optimization/44469
......
...@@ -1032,7 +1032,9 @@ clear_log_links (void) ...@@ -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 /* 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 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 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 static bool
insn_a_feeds_b (rtx a, rtx b) insn_a_feeds_b (rtx a, rtx b)
...@@ -1041,6 +1043,10 @@ 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)) for (links = LOG_LINKS (b); links; links = XEXP (links, 1))
if (XEXP (links, 0) == a) if (XEXP (links, 0) == a)
return true; return true;
#ifdef HAVE_cc0
if (sets_cc0_p (a))
return true;
#endif
return false; return false;
} }
......
2011-01-26 DJ Delorie <dj@redhat.com>
PR rtl-optimization/46878
* gcc.dg/pr46878-1.c: New test.
2011-01-26 Jakub Jelinek <jakub@redhat.com> 2011-01-26 Jakub Jelinek <jakub@redhat.com>
PR c++/47476 PR c++/47476
......
/* PR rtl-optimization/46878 */
/* Make sure this doesn't ICE. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
struct baz
{
int *newp;
};
int
get_ice (int *op, struct baz *ret)
{
int *tmpp;
int c;
c = (__foo () != 1);
if (__bar ())
{
return (1);
}
if (c)
tmpp = op;
if (tmpp)
{
}
else if (c)
{
ret->newp = tmpp;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment