This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/24074] (vector float){0, 0, b, a} code gen as not good as it should be
- From: "belyshev at depni dot sinp dot msu dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Sep 2005 05:49:32 -0000
- Subject: [Bug target/24074] (vector float){0, 0, b, a} code gen as not good as it should be
- References: <20050927042205.24074.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From belyshev at depni dot sinp dot msu dot ru 2005-09-27 05:49 -------
what happening here is:
xmm0 xmm1
movss _a, %xmm1 {?, ?, ?, ?} {a, 0, 0, 0}
movss _b, %xmm0 {b, 0, 0, 0} {a, 0, 0, 0}
unpcklps %xmm1, %xmm0 {b, a, 0, 0} {a, 0, 0, 0}
movaps %xmm0, %xmm1 {b, a, 0, 0} {b, a, 0, 0}
xorps %xmm0, %xmm0 {0, 0, 0, 0} {b, a, 0, 0}
movlhps %xmm1, %xmm0 {0, 0, b, a} {b, a, 0, 0}
ret
note we cannot substitute
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movlhps %xmm1, %xmm0
with just
movlhps %xmm0, %xmm0
because low-order 64 bits of the destination register are not modified,
but instead we could:
xmm0 xmm1
movss _a, %xmm1 {?, ?, ?, ?} {a, 0, 0, 0}
movss _b, %xmm0 {b, 0, 0, 0} {a, 0, 0, 0}
unpcklps %xmm1, %xmm0 {b, a, 0, 0} {a, 0, 0, 0}
shufps 78 /*[1,0,3,2]*/, %xmm0, %xmm0 {0, 0, b, a} {a, 0, 0, 0}
ret
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-09-27 05:49:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24074