This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/48037] Missed optimization: unnecessary register moves
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Mar 2011 12:42:20 +0000
- Subject: [Bug rtl-optimization/48037] Missed optimization: unnecessary register moves
- Auto-submitted: auto-generated
- References: <bug-48037-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48037
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-15 12:41:57 UTC ---
The patch fixed the pass-by-value cases to no longer go through stack memory.
The useless reg-reg moves prevail:
_Z6vsqrt2U8__vectord:
.LFB520:
.cfi_startproc
sqrtsd %xmm0, %xmm1
unpckhpd %xmm0, %xmm0
movapd %xmm1, %xmm2
sqrtsd %xmm0, %xmm0
unpcklpd %xmm0, %xmm2
movapd %xmm2, %xmm0
ret
both movapds can be avoided by better register allocation.