This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/33299] miscompilation with gfortran -O2 -ffast-math -ftree-vectorize



------- Comment #1 from rguenth at gcc dot gnu dot org  2007-09-04 09:55 -------
Confirmed.  It looks like the vectorizer forgets to update the PHI node for
stmp_var:

<bb 5>:
  # vect_var_.32_31 = PHI <vect_var_.32_29(3)>
  # s_4 = PHI <s_2(3)>
  # s_10 = PHI <s_2(3)>
  stmp_var_.34_32 = BIT_FIELD_REF <vect_var_.32_31, 64, 0>;
  stmp_var_.34_33 = BIT_FIELD_REF <vect_var_.32_31, 64, 64>;
  stmp_var_.34_34 = MIN_EXPR <stmp_var_.34_33, stmp_var_.34_32>;
  D.1396_15 = *x_14(D);
  if (D.1396_15 < 0.0)
    goto <bb 6>;
  else
    goto <bb 7>;

<bb 6>:
  s_16 = -stmp_var_.34_34;

<bb 7>: 
  # s_1 = PHI <s_4(5), s_16(6)>
  return s_1;

s_4 should be stmp_var_.34_34 instead.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dorit at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-09-04 09:55:14
               date|                            |


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


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