https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105007

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-03-21
     Ever confirmed|0                           |1
          Component|debug                       |tree-optimization

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Before cddce1:
  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG l_3 => 5
  # DEBUG i => 0
  # DEBUG BEGIN_STMT
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  i_6 = i_1 + 1;
  # DEBUG i => i_6

  <bb 4> :
  # i_1 = PHI <0(2), i_6(3)>
  # DEBUG i => i_1
  # DEBUG BEGIN_STMT
  if (i_1 != 8)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  test (5, 8);

After:
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG l_3 => 5
  # DEBUG i => 0
  # DEBUG BEGIN_STMT
  # DEBUG i => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  test (5, 8); [tail call]


Note CCP is able to figure out l_3 => 5 piece. When VRP figures out i => 8 and
changes "i_1 <= 7" into "i_1 != 8", it does not add a debug statement for i =>
8 after the branch (thinking it does not need one, I don't think it needs one
but CDDEC should be fixed such that it change i => NULL to 8 I think ....)

Reply via email to