public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/47270] New: [4.4/4.5/4.6 Regression] GCC produces unnecessary/wrong code on -O2 and -O3 levels
@ 2011-01-12 15:48 d.g.gorbachev at gmail dot com
  2011-01-13 10:56 ` [Bug rtl-optimization/47270] " rguenth at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-01-12 15:48 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.4/4.5/4.6 Regression] GCC produces
                    unnecessary/wrong code on -O2 and -O3 levels
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: d.g.gorbachev@gmail.com
              Host: i686-pc-linux-gnu
            Target: i686-pc-linux-gnu
             Build: i686-pc-linux-gnu


$ cat > testcase.c
register int r asm("esi");

void foo(void)
{
    if (r)
        __asm__("sar\t%0" : "+r" (r));

    __asm__("sar\t%0" : "+r" (r));
}
^D
$ gcc -O2 -S testcase.c
$ cat testcase.s
[...]
foo:
.LFB0:
        xorl    %eax, %eax
        testl   %esi, %esi
        je      .L2
#APP
# 6 "testcase.c" 1
        sar     %esi
# 0 "" 2
#NO_APP
        movl    %esi, %eax
.L2:
        movl    %eax, %esi
#APP
# 8 "testcase.c" 1
        sar     %esi
# 0 "" 2
#NO_APP
        ret
[...]


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

end of thread, other threads:[~2013-12-25  0:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-12 15:48 [Bug rtl-optimization/47270] New: [4.4/4.5/4.6 Regression] GCC produces unnecessary/wrong code on -O2 and -O3 levels d.g.gorbachev at gmail dot com
2011-01-13 10:56 ` [Bug rtl-optimization/47270] " rguenth at gcc dot gnu.org
2011-01-17 12:37 ` jakub at gcc dot gnu.org
2011-01-26 18:21 ` [Bug rtl-optimization/47270] [4.4/4.5/4.6 Regression] GCC produces unnecessary " d.g.gorbachev at gmail dot com
2011-04-16 10:30 ` [Bug rtl-optimization/47270] [4.4/4.5/4.6/4.7 " jakub at gcc dot gnu.org
2012-03-13 14:54 ` [Bug rtl-optimization/47270] [4.5/4.6/4.7/4.8 " jakub at gcc dot gnu.org
2012-07-02 13:13 ` [Bug rtl-optimization/47270] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
2013-03-05 23:29 ` steven at gcc dot gnu.org
2013-04-12 15:18 ` [Bug rtl-optimization/47270] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2013-04-12 20:34 ` d.g.gorbachev at gmail dot com
2013-12-25  0:00 ` steven at gcc dot gnu.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).