------- Comment #1 from rguenth at gcc dot gnu dot org  2008-11-01 14:14 -------
Seems to work now.  DOM1 threads the jump, if disabled PRE correctly detects
the partial redundant calls and optimizes them.  But we miss a jump threading
pass after PRE which makes us end up with

<bb 2>:
  *neig = 3;
  if (ABS_EXPR <cn> > 1.0e+0)
    goto <bb 9>;
  else
    goto <bb 3>;

<bb 9>:
  prephitmp.33 = 1.5e+0;
  prephitmp.31 = 4.99999999999997002397833512077340856194496154785e-1;
  prephitmp.29 = -1.0e+0;
  prephitmp.17 = 5.00000000000000111022302462515654042363166809082e-1;
  goto <bb 4>;

...

<bb 4>:
  if (prephitmp.33 < 1.00000000000000008180305391403130954586231382564e-5)
    goto <bb 7>;
  else
    goto <bb 5>;

<bb 5>:
  if (ABS_EXPR <prephitmp.17 - prephitmp.31> <
1.00000000000000008180305391403130954586231382564e-5)
    goto <bb 7>;
  else
    goto <bb 6>;

<bb 6>:
  if (ABS_EXPR <prephitmp.29 - prephitmp.31> <
1.00000000000000008180305391403130954586231382564e-5)
    goto <bb 7>;
  else
    goto <bb 8>;

<bb 7>:
  *neig = 2;


note that VRP doesn't track floating-point ranges and thus does not thread
jumps here.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37837

Reply via email to