public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/35341] New: Early exit loop with short known trip count not unrolled
@ 2008-02-24 4:21 xinliangli at gmail dot com
2008-02-24 21:58 ` [Bug middle-end/35341] " rguenth at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: xinliangli at gmail dot com @ 2008-02-24 4:21 UTC (permalink / raw)
To: gcc-bugs
Gcc fully unrolls short trip counted (known) loop if the unrolled loop body
size d oes not exceed a threshold. However, if the loop has early exit, this
is not done -- leading to missing scalar opt later on.
Example:
int a[100];
int b[100];
int foo(void)
{
int i, j;
for (i = 0; i < 5; i ++)
{
a[2*i] += a[i];
if (a[2*i] == 10) break;
}
return 0;
}
--
Summary: Early exit loop with short known trip count not unrolled
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: xinliangli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35341
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug middle-end/35341] Early exit loop with short known trip count not unrolled
2008-02-24 4:21 [Bug middle-end/35341] New: Early exit loop with short known trip count not unrolled xinliangli at gmail dot com
@ 2008-02-24 21:58 ` rguenth at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-24 21:58 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rakdver at gcc dot gnu dot
| |org
Severity|normal |enhancement
Keywords| |missed-optimization
Version|unknown |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35341
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-24 21:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-24 4:21 [Bug middle-end/35341] New: Early exit loop with short known trip count not unrolled xinliangli at gmail dot com
2008-02-24 21:58 ` [Bug middle-end/35341] " rguenth 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).