public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@physics.uc.edu>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: optimization/7476: constant variable tested in loop
Date: Fri, 02 Aug 2002 16:16:00 -0000	[thread overview]
Message-ID: <20020802231601.30746.qmail@sources.redhat.com> (raw)

The following reply was made to PR optimization/7476; it has been noted by GNATS.

From: Andrew Pinski <pinskia@physics.uc.edu>
To: Kevin Ryde <user42@zip.com.au>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: optimization/7476: constant variable tested in loop
Date: Fri, 2 Aug 2002 19:12:02 -0400

 This has been fixed in at least gcc 3.3 20020802 (experimental):
          .file   "foo.c"
          .text
          .align 2
          .p2align 4,,15
 .globl foo
          .type   foo, @function
 foo:
          pushl   %ebp
          movl    $9, %eax
          movl    %esp, %ebp
          .p2align 4,,15
 .L7:
          decl    %eax
          jns     .L7
          popl    %ebp
          ret
          .size   foo, .-foo
          .ident  "GCC: (GNU) 3.3 20020802 (experimental)"
 
 which is compared to gcc 3.1.1:
          .file   "foo.c"
          .section        .rodata.str1.1,"aMS",@progbits,1
 .LC0:
          .string "hello"
          .text
          .align 2
          .p2align 4,,15
 .globl foo
          .type   foo,@function
 foo:
          pushl   %ebp
          movl    %esp, %ebp
          pushl   %esi
          xorl    %esi, %esi
          pushl   %ebx
          movl    $9, %ebx
          subl    $16, %esp
          .p2align 4,,15
 .L7:
          testl   %esi, %esi
          jne     .L10
 .L4:
          decl    %ebx
          jns     .L7
          addl    $16, %esp
          popl    %ebx
          popl    %esi
          popl    %ebp
          ret
          .p2align 4,,7
 .L10:
          movl    $.LC0, (%esp)
          call    puts
          jmp     .L4
 .Lfe1:
          .size   foo,.Lfe1-foo
          .ident  "GCC: (GNU) 3.1.1"
 
 
 


             reply	other threads:[~2002-08-02 23:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-02 16:16 Andrew Pinski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-06 13:35 bangerth
2002-08-02 19:36 Daniel Berlin
2002-08-02 16:06 Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020802231601.30746.qmail@sources.redhat.com \
    --to=pinskia@physics.uc.edu \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).