public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/20372] New: Reversed branch-on-count loop (DoLoop)
@ 2005-03-07 21:57 pthaugen at us dot ibm dot com
2005-03-07 21:59 ` [Bug regression/20372] " pthaugen at us dot ibm dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: pthaugen at us dot ibm dot com @ 2005-03-07 21:57 UTC (permalink / raw)
To: gcc-bugs
Noticed a regression relative to 4.0 on the code generated for one of the loops
in zaxpy.f of the SPEC wupwise benchark. The loop is transformed into a
branch-on-count loop, but the target on the branch is the loop exit (return in
this case) instead of the loop start. The 'bct' is immediately followed by an
unconditional branch to the loop start.
Here's a snippet of the generated code (this is for the first loop in the
source, even though it appears as the second loop in the generated code). 'L18'
is the epilog block.
.L15:
addi %r0,%r7,-1 # D.511, ix,
...
...
stfdx %f11,%r11,%r31 # (* zy), SR.12
bdz .L18
b .L15
--
Summary: Reversed branch-on-count loop (DoLoop)
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: regression
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pthaugen at us dot ibm dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc*-*-*
GCC host triplet: powerpc*-*-*
GCC target triplet: powerpc*-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20372
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug regression/20372] Reversed branch-on-count loop (DoLoop)
2005-03-07 21:57 [Bug regression/20372] New: Reversed branch-on-count loop (DoLoop) pthaugen at us dot ibm dot com
@ 2005-03-07 21:59 ` pthaugen at us dot ibm dot com
2005-03-07 22:04 ` [Bug rtl-optimization/20372] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pthaugen at us dot ibm dot com @ 2005-03-07 21:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pthaugen at us dot ibm dot com 2005-03-07 21:59 -------
Created an attachment (id=8357)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8357&action=view)
Source file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20372
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/20372] Reversed branch-on-count loop (DoLoop)
2005-03-07 21:57 [Bug regression/20372] New: Reversed branch-on-count loop (DoLoop) pthaugen at us dot ibm dot com
2005-03-07 21:59 ` [Bug regression/20372] " pthaugen at us dot ibm dot com
@ 2005-03-07 22:04 ` pinskia at gcc dot gnu dot org
2005-03-07 22:19 ` [Bug rtl-optimization/20372] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-07 22:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-07 22:04 -------
I saw this too for some C code somewhere (but that was not a regression at least as far as I could see).
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Component|regression |rtl-optimization
Keywords| |missed-optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20372
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/20372] [4.0/4.1 Regression] Reversed branch-on-count loop (DoLoop)
2005-03-07 21:57 [Bug regression/20372] New: Reversed branch-on-count loop (DoLoop) pthaugen at us dot ibm dot com
2005-03-07 21:59 ` [Bug regression/20372] " pthaugen at us dot ibm dot com
2005-03-07 22:04 ` [Bug rtl-optimization/20372] " pinskia at gcc dot gnu dot org
@ 2005-03-07 22:19 ` pinskia at gcc dot gnu dot org
2005-03-09 20:32 ` [Bug rtl-optimization/20372] [4.0 " dje at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-07 22:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-07 22:19 -------
Here is a simplified C code which shows the problem:
int *ggg;
void f(int l1, int l2)
{
int i;
if (l1)
{
for(i=0;i<l1;i++)
ggg[i]=1;
return;
}
for(i=0;i<l2;i++)
ggg[i]=i;
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail| |4.0.0 4.1.0
Known to work| |3.3.3
Last reconfirmed|0000-00-00 00:00:00 |2005-03-07 22:19:07
date| |
Summary|Reversed branch-on-count |[4.0/4.1 Regression]
|loop (DoLoop) |Reversed branch-on-count
| |loop (DoLoop)
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20372
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/20372] [4.0 Regression] Reversed branch-on-count loop (DoLoop)
2005-03-07 21:57 [Bug regression/20372] New: Reversed branch-on-count loop (DoLoop) pthaugen at us dot ibm dot com
` (2 preceding siblings ...)
2005-03-07 22:19 ` [Bug rtl-optimization/20372] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-03-09 20:32 ` dje at gcc dot gnu dot org
2005-03-09 20:50 ` giovannibajo at libero dot it
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-03-09 20:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dje at gcc dot gnu dot org 2005-03-09 20:32 -------
Joern's patch fixes the regression on mainline.
http://gcc.gnu.org/ml/gcc-patches/2005-03/msg00777.html
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|4.0.0 4.1.0 |4.0.0
Summary|[4.0/4.1 Regression] |[4.0 Regression] Reversed
|Reversed branch-on-count |branch-on-count loop
|loop (DoLoop) |(DoLoop)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20372
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/20372] [4.0 Regression] Reversed branch-on-count loop (DoLoop)
2005-03-07 21:57 [Bug regression/20372] New: Reversed branch-on-count loop (DoLoop) pthaugen at us dot ibm dot com
` (3 preceding siblings ...)
2005-03-09 20:32 ` [Bug rtl-optimization/20372] [4.0 " dje at gcc dot gnu dot org
@ 2005-03-09 20:50 ` giovannibajo at libero dot it
2005-03-09 20:56 ` pthaugen at us dot ibm dot com
2005-03-09 22:41 ` [Bug rtl-optimization/20372] [4.1 " pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: giovannibajo at libero dot it @ 2005-03-09 20:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2005-03-09 20:50 -------
can the same patch be applied to 4.0 branch as well?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |sayle at gcc dot gnu dot
| |org, amylaar at gcc dot gnu
| |dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20372
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/20372] [4.0 Regression] Reversed branch-on-count loop (DoLoop)
2005-03-07 21:57 [Bug regression/20372] New: Reversed branch-on-count loop (DoLoop) pthaugen at us dot ibm dot com
` (4 preceding siblings ...)
2005-03-09 20:50 ` giovannibajo at libero dot it
@ 2005-03-09 20:56 ` pthaugen at us dot ibm dot com
2005-03-09 22:41 ` [Bug rtl-optimization/20372] [4.1 " pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pthaugen at us dot ibm dot com @ 2005-03-09 20:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pthaugen at us dot ibm dot com 2005-03-09 20:55 -------
I only noticed the regression on 4.1, things look fine to me on 4.0 (for both
zaxpy.f and Andrew's C example).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20372
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/20372] [4.1 Regression] Reversed branch-on-count loop (DoLoop)
2005-03-07 21:57 [Bug regression/20372] New: Reversed branch-on-count loop (DoLoop) pthaugen at us dot ibm dot com
` (5 preceding siblings ...)
2005-03-09 20:56 ` pthaugen at us dot ibm dot com
@ 2005-03-09 22:41 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-09 22:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-09 22:41 -------
Hmm, I thought I tested 4.0.0, I must have messed up. so closing as fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to fail|4.0.0 |
Known to work|3.3.3 |3.3.3 4.0.0
Resolution| |FIXED
Summary|[4.0 Regression] Reversed |[4.1 Regression] Reversed
|branch-on-count loop |branch-on-count loop
|(DoLoop) |(DoLoop)
Target Milestone|4.0.0 |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20372
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-03-09 22:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-07 21:57 [Bug regression/20372] New: Reversed branch-on-count loop (DoLoop) pthaugen at us dot ibm dot com
2005-03-07 21:59 ` [Bug regression/20372] " pthaugen at us dot ibm dot com
2005-03-07 22:04 ` [Bug rtl-optimization/20372] " pinskia at gcc dot gnu dot org
2005-03-07 22:19 ` [Bug rtl-optimization/20372] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-03-09 20:32 ` [Bug rtl-optimization/20372] [4.0 " dje at gcc dot gnu dot org
2005-03-09 20:50 ` giovannibajo at libero dot it
2005-03-09 20:56 ` pthaugen at us dot ibm dot com
2005-03-09 22:41 ` [Bug rtl-optimization/20372] [4.1 " 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).