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/43940] DOM doesn't propagate constants properly


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

--- Comment #5 from Steven Bosscher <steven at gcc dot gnu.org> 2012-03-18 22:48:49 UTC ---
With trunk today (r185508), on x86_64-linux at -O2 -fno-tree-vrp:

The .072t.ifcombine dump:
main ()
{
  void * p;

<bb 2>:
  p_2 = __builtin_malloc (4);
  if (p_2 != 0B)
    goto <bb 3>;
  else
    goto <bb 4>;

<bb 3>:
  __builtin_free (p_2);

<bb 4>:
  # p_1 = PHI <p_2(2), 0B(3)>
  __builtin_free (p_1);
  return 0;

}


And the .073t.phiopt1 dump:
main ()
{
  void * p;

<bb 2>:
  p_2 = __builtin_malloc (4);
  if (p_2 != 0B)
    goto <bb 3>;
  else
    goto <bb 4>;

<bb 3>:
  __builtin_free (p_2);

<bb 4>:
  # p_1 = PHI <0B(2), 0B(3)>
  __builtin_free (p_1);
  return 0;

}


And finally the 080t.dom1 dump:
main ()
{
  void * p;

<bb 2>:
  p_2 = __builtin_malloc (4);
  if (p_2 != 0B)
    goto <bb 3>; 
  else
    goto <bb 4>;

<bb 3>:
  __builtin_free (p_2);

<bb 4>:
  # p_1 = PHI <0B(2), 0B(3)>
  GIMPLE_NOP
  return 0;

}


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