public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/19401] New: Trivial loop not unrolled
@ 2005-01-12 16:08 rguenth at tat dot physik dot uni-tuebingen dot de
  2005-01-12 16:10 ` [Bug tree-optimization/19401] " rguenth at tat dot physik dot uni-tuebingen dot de
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: rguenth at tat dot physik dot uni-tuebingen dot de @ 2005-01-12 16:08 UTC (permalink / raw)
  To: gcc-bugs

We do not unroll the loop in

double foo(double __x)
{
        unsigned int __n = 2;
        double __y = __n % 2 ? __x : 1;

        while (__n >>= 1)
          {
            __x = __x * __x;
            if (__n % 2)
              __y = __y * __x;
          }

        return __y;
}

with -O2 which causes us to emit gratiously worse code
for std::pow(x, 2) than for std::pow(x, 2.0).

We should definitely get this right without -funroll-loops
and all its side-effects.

-- 
           Summary: Trivial loop not unrolled
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-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


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


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

end of thread, other threads:[~2005-05-07 19:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-12 16:08 [Bug tree-optimization/19401] New: Trivial loop not unrolled rguenth at tat dot physik dot uni-tuebingen dot de
2005-01-12 16:10 ` [Bug tree-optimization/19401] " rguenth at tat dot physik dot uni-tuebingen dot de
2005-01-12 16:14 ` pinskia at gcc dot gnu dot org
2005-01-12 16:19 ` rguenth at tat dot physik dot uni-tuebingen dot de
2005-01-12 16:21 ` pinskia at gcc dot gnu dot org
2005-01-12 16:24 ` rguenth at tat dot physik dot uni-tuebingen dot de
2005-01-12 17:05 ` gdr at integrable-solutions dot net
2005-01-12 17:06 ` gdr at integrable-solutions dot net
2005-01-13 13:48 ` pinskia at gcc dot gnu dot org
2005-01-14  9:04 ` rakdver at gcc dot gnu dot org
2005-01-24  9:43 ` rguenth at tat dot physik dot uni-tuebingen dot de
2005-05-06 21:11 ` cvs-commit at gcc dot gnu dot org
2005-05-07 19:56 ` 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).