public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/11710] New: loop optimizer cannot figure out # iterations for shift and / * "increments"
@ 2003-07-29 18:15 rguenth at tat dot physik dot uni-tuebingen dot de
2003-07-29 18:22 ` [Bug optimization/11710] " pinskia at physics dot uc dot edu
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: rguenth at tat dot physik dot uni-tuebingen dot de @ 2003-07-29 18:15 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11710
Summary: loop optimizer cannot figure out # iterations for shift
and / * "increments"
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at tat dot physik dot uni-tuebingen dot de
CC: gcc-bugs at gcc dot gnu dot org
All loops in the following testcases run a small constant amout of iterations.
If compiled with -O2 -funroll-loops they dont get unrolled, though, probably due
to the lack of the loop optimizer finding out the constant number of iterations.
This hurts optimization of libstdc++ pow(T, int) implementation for constant
second argument.
int shift()
{
int n = 5, i = 0;
while (n <<= 2)
++i;
return i;
}
int divide()
{
int n = 5, i = 0;
while (n /= 2)
++i;
return i;
}
int multiply()
{
int n = 5, i = 0;
while (n *= 2 < 20)
++i;
return i;
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug optimization/11710] loop optimizer cannot figure out # iterations for shift and / * "increments"
2003-07-29 18:15 [Bug optimization/11710] New: loop optimizer cannot figure out # iterations for shift and / * "increments" rguenth at tat dot physik dot uni-tuebingen dot de
@ 2003-07-29 18:22 ` pinskia at physics dot uc dot edu
2003-07-29 19:27 ` Zdenek Dvorak
2003-07-29 19:27 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
` (5 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-29 18:22 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11710
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |pessimizes-code
Last reconfirmed|0000-00-00 00:00:00 |2003-07-29 18:22:53
date| |
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-29 18:22 -------
I can confirm this on the mainline (20030729) on powerpc-apple-darwin6.6 but it is not fixed on
the rtlopt branch sorry.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Bug optimization/11710] loop optimizer cannot figure out # iterations for shift and / * "increments"
2003-07-29 18:22 ` [Bug optimization/11710] " pinskia at physics dot uc dot edu
@ 2003-07-29 19:27 ` Zdenek Dvorak
0 siblings, 0 replies; 9+ messages in thread
From: Zdenek Dvorak @ 2003-07-29 19:27 UTC (permalink / raw)
To: pinskia at physics dot uc dot edu; +Cc: gcc-bugs
Hello,
> I can confirm this on the mainline (20030729) on powerpc-apple-darwin6.6 but it is not fixed on
> the rtlopt branch sorry.
yes, this feature is not supported neither by old nor by new loop
optimizer just now. It might be with the new iv analysis that is being
written for tree-ssa (although this is only my guess). Handling
non-linear induction variables brings very little gain in practice,
as they are rare, and it has very small priority for me now.
Zdenek
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug optimization/11710] loop optimizer cannot figure out # iterations for shift and / * "increments"
2003-07-29 18:15 [Bug optimization/11710] New: loop optimizer cannot figure out # iterations for shift and / * "increments" rguenth at tat dot physik dot uni-tuebingen dot de
2003-07-29 18:22 ` [Bug optimization/11710] " pinskia at physics dot uc dot edu
@ 2003-07-29 19:27 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2003-08-03 19:34 ` neroden at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: rakdver at atrey dot karlin dot mff dot cuni dot cz @ 2003-07-29 19:27 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11710
------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz 2003-07-29 19:27 -------
Subject: Re: loop optimizer cannot figure out # iterations for shift and / * "increments"
Hello,
> I can confirm this on the mainline (20030729) on powerpc-apple-darwin6.6 but it is not fixed on
> the rtlopt branch sorry.
yes, this feature is not supported neither by old nor by new loop
optimizer just now. It might be with the new iv analysis that is being
written for tree-ssa (although this is only my guess). Handling
non-linear induction variables brings very little gain in practice,
as they are rare, and it has very small priority for me now.
Zdenek
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug optimization/11710] loop optimizer cannot figure out # iterations for shift and / * "increments"
2003-07-29 18:15 [Bug optimization/11710] New: loop optimizer cannot figure out # iterations for shift and / * "increments" rguenth at tat dot physik dot uni-tuebingen dot de
2003-07-29 18:22 ` [Bug optimization/11710] " pinskia at physics dot uc dot edu
2003-07-29 19:27 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
@ 2003-08-03 19:34 ` neroden at gcc dot gnu dot org
2004-03-12 1:45 ` rakdver at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: neroden at gcc dot gnu dot org @ 2003-08-03 19:34 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11710
neroden at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4 |---
------- Additional Comments From neroden at gcc dot gnu dot org 2003-08-03 19:34 -------
Not gonna happen for 3.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug optimization/11710] loop optimizer cannot figure out # iterations for shift and / * "increments"
2003-07-29 18:15 [Bug optimization/11710] New: loop optimizer cannot figure out # iterations for shift and / * "increments" rguenth at tat dot physik dot uni-tuebingen dot de
` (2 preceding siblings ...)
2003-08-03 19:34 ` neroden at gcc dot gnu dot org
@ 2004-03-12 1:45 ` rakdver at gcc dot gnu dot org
2004-03-12 4:27 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2004-03-12 1:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rakdver at gcc dot gnu dot org 2004-03-12 01:45 -------
Fixed on lno-branch by
http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00995.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11710
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug optimization/11710] loop optimizer cannot figure out # iterations for shift and / * "increments"
2003-07-29 18:15 [Bug optimization/11710] New: loop optimizer cannot figure out # iterations for shift and / * "increments" rguenth at tat dot physik dot uni-tuebingen dot de
` (3 preceding siblings ...)
2004-03-12 1:45 ` rakdver at gcc dot gnu dot org
@ 2004-03-12 4:27 ` pinskia at gcc dot gnu dot org
2004-09-20 1:02 ` [Bug rtl-optimization/11710] " pinskia at gcc dot gnu dot org
2004-10-02 4:04 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-12 4:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-12 04:27 -------
Fixed on the lno so suspending as fixed on the lno branch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |SUSPENDED
Target Milestone|--- |lno
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11710
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/11710] loop optimizer cannot figure out # iterations for shift and / * "increments"
2003-07-29 18:15 [Bug optimization/11710] New: loop optimizer cannot figure out # iterations for shift and / * "increments" rguenth at tat dot physik dot uni-tuebingen dot de
` (4 preceding siblings ...)
2004-03-12 4:27 ` pinskia at gcc dot gnu dot org
@ 2004-09-20 1:02 ` pinskia at gcc dot gnu dot org
2004-10-02 4:04 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-20 1:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-20 01:02 -------
This is fixed on the mainline with the option -ftree-loop-ivcanon which should be enabled by default
but is not yet.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rakdver at gcc dot gnu dot
| |org
Status|SUSPENDED |NEW
Known to fail|2.97 3.0 3.0.1 3.0.2 3.0.3 |2.97 3.0 3.0.1 3.0.2 3.0.3
|3.0.4 3.1 3.1.1 3.1.2 3.2 |3.0.4 3.1 3.1.1 3.1.2 3.2
|3.2.1 3.2.2 3.2.3 3.3 3.3.1 |3.2.1 3.2.2 3.2.3 3.3 3.3.1
|3.3.2 3.3.3 3.4.0 4.0 |3.3.2 3.3.3 3.4.0 4.0.0
Known to work| |lno
Last reconfirmed|2004-06-11 00:51:41 |2004-09-20 01:02:53
date| |
Target Milestone|lno |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11710
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/11710] loop optimizer cannot figure out # iterations for shift and / * "increments"
2003-07-29 18:15 [Bug optimization/11710] New: loop optimizer cannot figure out # iterations for shift and / * "increments" rguenth at tat dot physik dot uni-tuebingen dot de
` (5 preceding siblings ...)
2004-09-20 1:02 ` [Bug rtl-optimization/11710] " pinskia at gcc dot gnu dot org
@ 2004-10-02 4:04 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-02 4:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-02 04:04 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to fail|2.97 3.0 3.0.1 3.0.2 3.0.3 |2.97 3.0 3.0.1 3.0.2 3.0.3
|3.0.4 3.1 3.1.1 3.1.2 3.2 |3.0.4 3.1 3.1.1 3.1.2 3.2
|3.2.1 3.2.2 3.2.3 3.3 3.3.1 |3.2.1 3.2.2 3.2.3 3.3 3.3.1
|3.3.2 3.3.3 3.4.0 4.0.0 |3.3.2 3.3.3 3.4.0
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11710
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-10-02 4:04 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29 18:15 [Bug optimization/11710] New: loop optimizer cannot figure out # iterations for shift and / * "increments" rguenth at tat dot physik dot uni-tuebingen dot de
2003-07-29 18:22 ` [Bug optimization/11710] " pinskia at physics dot uc dot edu
2003-07-29 19:27 ` Zdenek Dvorak
2003-07-29 19:27 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2003-08-03 19:34 ` neroden at gcc dot gnu dot org
2004-03-12 1:45 ` rakdver at gcc dot gnu dot org
2004-03-12 4:27 ` pinskia at gcc dot gnu dot org
2004-09-20 1:02 ` [Bug rtl-optimization/11710] " pinskia at gcc dot gnu dot org
2004-10-02 4:04 ` 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).