[Bug rtl-optimization/61559] New: FAIL: gcc.dg/builtin-bswap-8.c on i686 with -mmovbe
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jun 19 09:16:00 GMT 2014
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
More information about the Gcc-bugs
mailing list