This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/50107] [IRA, i386] allocates regiters in very non-optimal way
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Aug 2011 15:23:59 +0000
- Subject: [Bug rtl-optimization/50107] [IRA, i386] allocates regiters in very non-optimal way
- Auto-submitted: auto-generated
- References: <bug-50107-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50107
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-08-18
Ever Confirmed|0 |1
--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> 2011-08-18 15:23:59 UTC ---
With revision 177865 + MULX change, I got
[hjl@gnu-6 pr50107]$ cat uti-2.i
unsigned __int128 test_mul_64 (unsigned long long a, unsigned long long b)
{
return (unsigned __int128) a*b;
}
[hjl@gnu-6 pr50107]$ make uti-2.s
/export/build/gnu/gcc-hsw/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-hsw/build-x86_64-linux/gcc/ -S -o uti-2.s -O2 -mbmi2
uti-2.i
[hjl@gnu-6 pr50107]$ cat uti-2.s
.file "uti-2.i"
.text
.p2align 4,,15
.globl test_mul_64
.type test_mul_64, @function
test_mul_64:
.LFB0:
.cfi_startproc
movq %rdi, %rdx
mulx %rsi, %rax, %rsi
movq %rsi, %rdx
ret
.cfi_endproc
.LFE0:
.size test_mul_64, .-test_mul_64
.ident "GCC: (GNU) 4.7.0 20110818 (experimental)"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-6 pr50107]$
I would expect
movq %rdi, %rdx
mulx %rsi, %rax, %rdx
ret