This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/32662] Significant extra code generation for 64x64=>128-bit multiply
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2007 08:22:53 -0000
- Subject: [Bug middle-end/32662] Significant extra code generation for 64x64=>128-bit multiply
- References: <bug-32662-14600@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from ubizjak at gmail dot com 2007-07-07 08:22 -------
This is fixed in gcc-4.3:
_Z3fooPyPKyy:
movq %rdx, %rax
mulq (%rsi)
movq %rdx, (%rdi)
ret
_Z3fooPyPKyyy:
andq (%rsi), %rcx
movq %rcx, %rax
mulq %rdx
movq %rdx, (%rdi)
ret
_Z4foo2PyPKyy:
movq %rdx, %r8
movq %rdx, %rax
pushq %rbx <<< here
mulq (%rsi)
popq %rbx <<< here
movq %rdx, (%rdi)
movq 8(%rsi), %rax
mulq %r8
movq %rdx, 8(%rdi)
ret
_Z4foo2PyPKyyy:
movq %rcx, %r9
andq (%rsi), %r9
movq %rdx, %r10
movq %r9, %rax
mulq %rdx
movq %rdx, (%rdi)
andq 8(%rsi), %rcx
movq %rcx, %rax
mulq %r10
movq %rdx, 8(%rdi)
ret
A lot of infrastructure changes were introduced during gcc-4.3 development
(subregs splitting, dataflow) to produce the code above, and these changes
surely won't get ported to release branches.
Saving and restoring %rbx is not needed in foo2 case, perhaps dataflow experts
know why it is still generated?
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32662