public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23475] New: Frequences are not updated for empty loop removal
@ 2005-08-19  5:58 pinskia at gcc dot gnu dot org
  2005-08-19  5:58 ` [Bug tree-optimization/23475] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-19  5:58 UTC (permalink / raw)
  To: gcc-bugs

Testcase:
int f(int t)
{
  int i;
  if(t)
    for(i = 0 ;i<100000;i++)
      ;
   else
    return 2;
  return 1;
}

----
in the tree dump:
<bb 0>:
  if (t_3 != 0) goto <L1>; else goto <L6>;

Invalid sum of incoming frequencies 1100, should be 10000
  # i_6 = PHI <0(0)>;
<L1>:;
  i_8 = i_6 + 1;

Invalid sum of incoming frequencies 10542, should be 1642
  # D.1276_2 = PHI <2(0), 1(1)>;
<L6>:;
  return D.1276_2;

--- in final_cleanup:
<bb 0>:
  if (t != 0) goto <L1>; else goto <L14>;

<L14>:;
  D.1276 = 2;
  goto <bb 3> (<L6>);

Invalid sum of incoming frequencies 1100, should be 10000
<L1>:;
  D.1276 = 1;

Invalid sum of incoming frequencies 10542, should be 1642
<L6>:;
  return D.1276;

-- 
           Summary: Frequences are not updated for empty loop removal
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-09-07 14:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-19  5:58 [Bug tree-optimization/23475] New: Frequences are not updated for empty loop removal pinskia at gcc dot gnu dot org
2005-08-19  5:58 ` [Bug tree-optimization/23475] " pinskia at gcc dot gnu dot org
2005-08-19  6:01 ` pinskia at gcc dot gnu dot org
2005-08-19  6:01 ` pinskia at gcc dot gnu dot org
2005-08-24 11:48 ` rakdver at gcc dot gnu dot org
2005-08-27  9:23 ` rakdver at gcc dot gnu dot org
2005-08-29  7:18 ` cvs-commit at gcc dot gnu dot org
2005-08-29  8:30 ` rakdver at gcc dot gnu dot org
2005-09-07 14:13 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).