This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Jump threading fix II


On Sat, Jan 05, 2002 at 01:33:51AM +0100, Jan Hubicka wrote:
> 
> Hi,
> This finally appears to be the MIPS problem.  When caring the reversed
> conditonals I used mistakely first part instead of second. The first in
> IF_THEN_ELSE is the condition, not the THEN case.  i386 uses no
> reversed conditionals anymore (probably MIPS should not do as well), that
> explains why I didn't run into similar problems.
> 
> Bootstrapped/regtested i386, MIPS in progress. If it passes I will install
> it as obvious.

Here are some codes from your change:

  set1 = pc_set (e->src->end);
  set2 = pc_set (b->end);
  if (((e->flags & EDGE_FALLTHRU) != 0)
      != (XEXP (SET_SRC (set1), 0) == pc_rtx))
    reverse1 = true;

  cond1 = XEXP (SET_SRC (set1), 0);
  cond2 = XEXP (SET_SRC (set2), 0);
  if (reverse1) 
    code1 = reversed_comparison_code (cond1, b->end);
  else
    code1 = GET_CODE (cond1);

  code2 = GET_CODE (cond2);
  reversed_code2 = reversed_comparison_code (cond2, b->end);

  if (!comparison_dominates_p (code1, code2)
      && !comparison_dominates_p (code1, reversed_code2))
    return NULL;

Could you please double check if

  if (((e->flags & EDGE_FALLTHRU) != 0)
      != (XEXP (SET_SRC (set1), 0) == pc_rtx))
    reverse1 = true;

and

  if (reverse1) 
    code1 = reversed_comparison_code (cond1, b->end);
  else
    code1 = GET_CODE (cond1);

are ok? Since your change causes the mips bootstrap failure, may I
suggest you go over

http://gcc.gnu.org/ml/gcc-patches/2001-12/msg01658.html

line by line and convince yourself they are 100% correct?

Thanks.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]