public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/11707] New: constants not propagated in unrolled loop iterations with a conditional
@ 2003-07-29 13:34 rguenth at tat dot physik dot uni-tuebingen dot de
  2003-07-29 13:40 ` [Bug optimization/11707] " pinskia at physics dot uc dot edu
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: rguenth at tat dot physik dot uni-tuebingen dot de @ 2003-07-29 13: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=11707

           Summary: constants not propagated in unrolled loop iterations
                    with a conditional
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          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
  GCC host triplet: i686-pc-linux-gnu

The following testcase fails to cprop:

int foo2()
{
        unsigned int n = 5, i;
        int a = 1;
        for (i=0; i<2; ++i) {
                n /= 2;
                if (n)
                        a *= a;
        }
        return a;
}

while if omitting the if (n) check which is always true, cprop works and
the result is computed at compile time.

The lack of this optimization hurts optimization of libstdc++ pow(T, int)
implementation.


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

end of thread, other threads:[~2005-08-22 12:47 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29 13:34 [Bug optimization/11707] New: constants not propagated in unrolled loop iterations with a conditional rguenth at tat dot physik dot uni-tuebingen dot de
2003-07-29 13:40 ` [Bug optimization/11707] " pinskia at physics dot uc dot edu
2003-07-29 13:45 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-07-29 14:07 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-07-29 14:13 ` [Bug optimization/11707] [3.4 Regression] [new unroller] " pinskia at physics dot uc dot edu
2003-09-29 13:54 ` rakdver at gcc dot gnu dot org
2003-09-29 14:14 ` rakdver at gcc dot gnu dot org
2003-09-29 14:39 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-09-29 16:48 ` rguenth at tat dot physik dot uni-tuebingen dot de
2003-12-05  3:33 ` pinskia at gcc dot gnu dot org
2003-12-05 21:47 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2004-01-04  8:54 ` pinskia at gcc dot gnu dot org
2004-03-09 23:27 ` [Bug optimization/11707] [3.4/3.5 " mmitchel at gcc dot gnu dot org
2004-03-09 23:28 ` mmitchel at gcc dot gnu dot org
2004-03-21 18:24 ` steven at gcc dot gnu dot org
2004-06-18 23:41 ` [Bug rtl-optimization/11707] " mmitchel at gcc dot gnu dot org
2004-08-10  1:38 ` pinskia at gcc dot gnu dot org
2004-08-12  7:33 ` steven at gcc dot gnu dot org
2004-08-29 19:02 ` [Bug rtl-optimization/11707] [3.4 " mmitchel at gcc dot gnu dot org
2004-10-30 19:34 ` mmitchel at gcc dot gnu dot org
2004-11-01  0:45 ` mmitchel at gcc dot gnu dot org
2005-01-12 11:06 ` rguenth at tat dot physik dot uni-tuebingen dot de
2005-02-10 18:35 ` rguenth at gcc dot gnu dot org
2005-02-10 18:36 ` steven at gcc dot gnu dot org
2005-05-19 17:24 ` mmitchel at gcc dot gnu dot org
2005-08-22 12:49 ` 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).