[Bug target/18503] _mm_move_ss SSE intrinsic causes erroneous
uros at kss-loka dot si
gcc-bugzilla@gcc.gnu.org
Wed Nov 17 09:17:00 GMT 2004
------- Additional Comments From uros at kss-loka dot si 2004-11-17 09:17 -------
The problem was that "sse_movss" pattern has wrong vec_merge constant, so it was
wrongly combined to "vmsubv4sf3" pattern. Instead of 0x1, "sse_movss" pattern
should have 0x14:
(define_insn "sse_movss"
[(set (match_operand:V4SF 0 "register_operand" "=x")
(vec_merge:V4SF
(match_operand:V4SF 1 "register_operand" "0")
(match_operand:V4SF 2 "register_operand" "x")
(const_int 14)))] <- here!
"TARGET_SSE"
"movss\t{%2, %0|%0, %2}"
[(set_attr "type" "ssemov")
(set_attr "mode" "SF")])
With this change, the result from your testcase is OK. ASM code looks like:
bug:
movaps %xmm0, %xmm2
subps %xmm1, %xmm2
pushl %ebp
movl %esp, %ebp
movaps %xmm2, %xmm1
movss %xmm0, %xmm1
popl %ebp
movaps %xmm1, %xmm0
ret
BTW: "sse2_movsd" pattern has the same problem... And "sse_loadss_1",
"sse_storess" and their sse2 equivalents.
Bug is confirmed, a patch will follow soon...
Thanks,
Uros.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18503
More information about the Gcc-bugs
mailing list