This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR target/39327: Incorrect addsub/unpck patterns in sse.md
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Ye, Joey" <joey dot ye at intel dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "ubizjak at gmail dot com" <ubizjak at gmail dot com>, "Guo, Xuepeng" <xuepeng dot guo at intel dot com>
- Date: Thu, 12 Mar 2009 06:23:27 -0700
- Subject: Re: PATCH: PR target/39327: Incorrect addsub/unpck patterns in sse.md
- References: <20090228183945.GA1055@lucon.org> <F2363DE71B5050498545B523673042DE01986380AF@pdsmsx503.ccr.corp.intel.com>
On Thu, Mar 12, 2009 at 03:36:58PM +0800, Joey Ye wrote:
> HJ,
>
> I might be wrong too. These insns are so complicated.
>
> Take sse3_addsubps as an example, bit reverse of 5 (0101b)
> should be 10 (1010b).
>
Ooops. I am testing this patch. OK for trunk and 4.3 is if
it passes all regression tests?
Thanks.
H.J.
----
2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
PR target/39327
* config/i386/sse.md (avx_addsubv8sf3): Correct item bits.
(avx_addsubv4df3): Likewise.
(*avx_addsubv4sf3): Likewise.
(sse3_addsubv4sf3): Likewise.
Index: gcc/config/i386/sse.md
===================================================================
--- gcc/config/i386/sse.md (revision 144810)
+++ gcc/config/i386/sse.md (working copy)
@@ -1101,7 +1101,7 @@
(match_operand:V8SF 1 "register_operand" "x")
(match_operand:V8SF 2 "nonimmediate_operand" "xm"))
(minus:V8SF (match_dup 1) (match_dup 2))
- (const_int 66)))]
+ (const_int 170)))]
"TARGET_AVX"
"vaddsubps\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "sseadd")
@@ -1115,7 +1115,7 @@
(match_operand:V4DF 1 "register_operand" "x")
(match_operand:V4DF 2 "nonimmediate_operand" "xm"))
(minus:V4DF (match_dup 1) (match_dup 2))
- (const_int 6)))]
+ (const_int 10)))]
"TARGET_AVX"
"vaddsubpd\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "sseadd")
@@ -1129,7 +1129,7 @@
(match_operand:V4SF 1 "register_operand" "x")
(match_operand:V4SF 2 "nonimmediate_operand" "xm"))
(minus:V4SF (match_dup 1) (match_dup 2))
- (const_int 6)))]
+ (const_int 10)))]
"TARGET_AVX"
"vaddsubps\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "sseadd")
@@ -1143,7 +1143,7 @@
(match_operand:V4SF 1 "register_operand" "0")
(match_operand:V4SF 2 "nonimmediate_operand" "xm"))
(minus:V4SF (match_dup 1) (match_dup 2))
- (const_int 6)))]
+ (const_int 10)))]
"TARGET_SSE3"
"addsubps\t{%2, %0|%0, %2}"
[(set_attr "type" "sseadd")