public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-13876-4@http.gcc.gnu.org/bugzilla/>]
* [Bug optimization/13876] New: loop not fully optimized
@ 2004-01-27  6:06 pinskia at gcc dot gnu dot org
  2004-05-24 15:19 ` [Bug tree-optimization/13876] " pinskia at gcc dot gnu dot org
  2005-05-07 18:53 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-27  6:06 UTC (permalink / raw)
  To: gcc-bugs

Basically these two functions should produce the same code, the check for NotFound is not needed 
at all.
void g(); void h(); void o();
void t(int l, int *y)
{
int i;
int NotFound;
o();
for(i = 0, NotFound = 1;NotFound && i<l;i++)
{  if (y[i])  { NotFound = 0;  g();  } }
h();
}


void t1(int l, int *y)
{
int i;
int NotFound;
o();
for(i = 0, NotFound = 1;NotFound && i<l;i++)
{  if (y[i])  { NotFound = 0;  g();  break; } }
h();
}

-- 
           Summary: loop not fully optimized
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          Severity: enhancement
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: dann at godzilla dot ics dot uci dot edu,gcc-bugs at gcc
                    dot gnu dot org


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


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

end of thread, other threads:[~2014-12-01  5:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-13876-6528@http.gcc.gnu.org/bugzilla/>
2006-02-27 13:53 ` [Bug tree-optimization/13876] loop not fully optimized steven at gcc dot gnu dot org
2006-02-27 14:22 ` pinskia at gcc dot gnu dot org
2006-03-21 15:08 ` law at redhat dot com
2007-04-22 11:49 ` rguenth at gcc dot gnu dot org
2007-04-22 17:39 ` pinskia at gcc dot gnu dot org
     [not found] <bug-13876-4@http.gcc.gnu.org/bugzilla/>
2014-12-01  5:20 ` pinskia at gcc dot gnu.org
2004-01-27  6:06 [Bug optimization/13876] New: " pinskia at gcc dot gnu dot org
2004-05-24 15:19 ` [Bug tree-optimization/13876] " pinskia at gcc dot gnu dot org
2005-05-07 18:53 ` 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).