public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/61559] New: FAIL: gcc.dg/builtin-bswap-8.c on i686 with -mmovbe
@ 2014-06-19  9:16 ubizjak at gmail dot com
  2014-06-19  9:18 ` [Bug rtl-optimization/61559] " ubizjak at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2014-06-19  9:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61559

            Bug ID: 61559
           Summary: FAIL: gcc.dg/builtin-bswap-8.c on i686 with -mmovbe
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ubizjak at gmail dot com
            Target: i686-pc-linux-gnu

gcc.dg/builtin-bswap-8.c fails on i686 with -mmovbe:

~/gcc-build/gcc/cc1 -O2 -march=corei7 -mmovbe -m32 builtin-bswap-8.c

foo5:
        movbe   4(%esp), %eax
        movbe   8(%esp), %edx
        andl    %edx, %eax
        bswap   %eax
        ret
foo6:
        movbe   4(%esp), %eax
        movbe   8(%esp), %edx
        orl     %edx, %eax
        bswap   %eax
        ret
foo7:
        movbe   4(%esp), %eax
        movbe   8(%esp), %edx
        xorl    %edx, %eax
        bswap   %eax
        ret

It looks that direct swap from memory (movbe) interferes with bswap
elimination. Without -mmovbe, following asm is produced:

foo5:
        movl    8(%esp), %eax
        andl    4(%esp), %eax
        ret
foo6:
        movl    8(%esp), %eax
        orl     4(%esp), %eax
        ret
foo7:
        movl    8(%esp), %eax
        xorl    4(%esp), %eax
        ret


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

end of thread, other threads:[~2014-11-13  8:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-19  9:16 [Bug rtl-optimization/61559] New: FAIL: gcc.dg/builtin-bswap-8.c on i686 with -mmovbe ubizjak at gmail dot com
2014-06-19  9:18 ` [Bug rtl-optimization/61559] " ubizjak at gmail dot com
2014-06-25  5:13 ` thopre01 at gcc dot gnu.org
2014-06-25  6:22 ` ebotcazou at gcc dot gnu.org
2014-09-03 17:11 ` [Bug tree-optimization/61559] " ubizjak at gmail dot com
2014-09-04  8:56 ` rguenth at gcc dot gnu.org
2014-09-04  9:52 ` jakub at gcc dot gnu.org
2014-09-04  9:59 ` rguenther at suse dot de
2014-09-04 11:36 ` ubizjak at gmail dot com
2014-09-04 11:52 ` rguenther at suse dot de
2014-09-04 12:08 ` jakub at gcc dot gnu.org
2014-11-13  8:46 ` rguenth 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).