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/19431] missed optimization with ifs and deferencing


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-13 21:54 -------
This comes from "std::_Deque_base<_Tp, _Alloc>::_M_initialize_map" in libstdc++.

Here is the last SSA tree dump:
f (k, i1, j1)
{
  int * f1;
  int D.1116;

<bb 0>:
  if (k_2 != 0) goto <L2>; else goto <L4>;

<L4>:;

  # f1_1 = PHI <&i1(0), &j1(1)>;
<L2>:;
  #   VUSE <i1_7>;
  #   VUSE <j1_8>;
  D.1116_3 = *f1_1;
  return D.1116_3;

}

And the .final_cleanup one:
f (k, i1, j1)
{
  int * f1;

<bb 0>:
  if (k != 0) goto <L5>; else goto <L4>;

<L5>:;
  f1 = &i1;
  goto <bb 3> (<L2>);

<L4>:;
  f1 = &j1;

<L2>:;
  return *f1;

}

-- 


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


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