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/42720] Problematic condition simplification logic at unswitch-loops pass



------- Comment #2 from pinskia at gcc dot gnu dot org  2010-01-29 23:38 -------
On x86, the empty loop is removed at -O3 on the tree level:
<bb 3>:
  if (obj_7(D) != 0B)
    goto <bb 4>;
  else
    goto <bb 5>;

<bb 4>:
  # i_18 = PHI <0(3), i_20(4)>
  # s_23 = PHI <0(3), s_2(4)>
  obj.0_8 = (int) obj_7(D);
  D.2053_25 = (unsigned int) i_18;
  D.1247_13 = MEM[base: hbs_11(D), index: D.2053_25, step: 4];
  D.1248_14 = obj.0_8 - D.1247_13;
  s_19 = s_23 + D.1247_13;
  s_2 = [cond_expr] D.1248_14 > 0 ? s_19 : s_23;
  i_20 = i_18 + 1;
  if (i_20 != num_6(D))
    goto <bb 4>;
  else
    goto <bb 5>;

<bb 5>:
  # s_3 = PHI <s_2(4), 0(3)>


-- 


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


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