]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sse.md (sse5_pperm, [...]): Fix constraints.
authorJakub Jelinek <jakub@redhat.com>
Tue, 1 Jan 2008 01:13:27 +0000 (02:13 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 1 Jan 2008 01:13:27 +0000 (02:13 +0100)
* config/i386/sse.md (sse5_pperm, sse5_pperm_pack_v2di_v4si,
sse5_pperm_pack_v4si_v8hi, sse5_pperm_pack_v8hi_v16qi,
sse5_perm<mode>): Fix constraints.

* gcc.target/i386/i386.exp (check_effective_target_sse5): Use __v8hi
rather than __v2di type.

From-SVN: r131244

gcc/ChangeLog
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/i386.exp

index f951aa10e5e62495c1a8551edef2164c1e9da1d7..37c9a5282fa87dafbe0761085bd9c179424f90d4 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-01  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/i386/sse.md (sse5_pperm, sse5_pperm_pack_v2di_v4si,
+       sse5_pperm_pack_v4si_v8hi, sse5_pperm_pack_v8hi_v16qi,
+       sse5_perm<mode>): Fix constraints.
+
 2007-12-31  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        PR driver/33772
index 3c0d497392e7dfecdb4ab26bf6170ddd29936a1e..617ed3529435745de5a6bb5a77caf8664a56193d 100644 (file)
 ;; SSE5 permute instructions
 (define_insn "sse5_pperm"
   [(set (match_operand:V16QI 0 "register_operand" "=x,x,x,x")
-       (unspec:V16QI [(match_operand:V16QI 1 "nonimmediate_operand" "0,0,xm,xm")
-                      (match_operand:V16QI 2 "nonimmediate_operand" "x,xm,0,x")
-                      (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,x,0")]
+       (unspec:V16QI [(match_operand:V16QI 1 "nonimmediate_operand" "0,0,x,xm")
+                      (match_operand:V16QI 2 "nonimmediate_operand" "x,xm,xm,x")
+                      (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,0,0")]
                     UNSPEC_SSE5_PERMUTE))]
   "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)"
   "pperm\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set (match_operand:V4SI 0 "register_operand" "=x,x,x,x")
        (vec_concat:V4SI
         (truncate:V2SI
-         (match_operand:V2DI 1 "nonimmediate_operand" "0,0,xm,xm"))
+         (match_operand:V2DI 1 "nonimmediate_operand" "0,0,x,xm"))
         (truncate:V2SI
-         (match_operand:V2DI 2 "nonimmediate_operand" "x,xm,0,x"))))
-   (use (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,x,0"))]
+         (match_operand:V2DI 2 "nonimmediate_operand" "x,xm,xm,x"))))
+   (use (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,0,0"))]
   "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)"
   "pperm\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set_attr "type" "sse4arg")
   [(set (match_operand:V8HI 0 "register_operand" "=x,x,x,x")
        (vec_concat:V8HI
         (truncate:V4HI
-         (match_operand:V4SI 1 "nonimmediate_operand" "0,0,xm,xm"))
+         (match_operand:V4SI 1 "nonimmediate_operand" "0,0,x,xm"))
         (truncate:V4HI
-         (match_operand:V4SI 2 "nonimmediate_operand" "x,xm,0,x"))))
-   (use (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,x,0"))]
+         (match_operand:V4SI 2 "nonimmediate_operand" "x,xm,xm,x"))))
+   (use (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,0,0"))]
   "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)"
   "pperm\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set_attr "type" "sse4arg")
   [(set (match_operand:V16QI 0 "register_operand" "=x,x,x,x")
        (vec_concat:V16QI
         (truncate:V8QI
-         (match_operand:V8HI 1 "nonimmediate_operand" "0,0,xm,xm"))
+         (match_operand:V8HI 1 "nonimmediate_operand" "0,0,x,xm"))
         (truncate:V8QI
-         (match_operand:V8HI 2 "nonimmediate_operand" "x,xm,0,x"))))
-   (use (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,x,0"))]
+         (match_operand:V8HI 2 "nonimmediate_operand" "x,xm,xm,x"))))
+   (use (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,0,0"))]
   "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)"
   "pperm\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set_attr "type" "sse4arg")
 (define_insn "sse5_perm<mode>"
   [(set (match_operand:SSEMODEF2P 0 "register_operand" "=x,x,x,x")
        (unspec:SSEMODEF2P
-        [(match_operand:SSEMODEF2P 1 "nonimmediate_operand" "0,0,xm,xm")
-         (match_operand:SSEMODEF2P 2 "nonimmediate_operand" "x,xm,0,x")
-         (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,x,0")]
+        [(match_operand:SSEMODEF2P 1 "nonimmediate_operand" "0,0,x,xm")
+         (match_operand:SSEMODEF2P 2 "nonimmediate_operand" "x,xm,xm,x")
+         (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,0,0")]
         UNSPEC_SSE5_PERMUTE))]
   "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)"
   "perm<ssemodesuffixf4>\t{%3, %2, %1, %0|%0, %1, %2, %3}"
index c7a8e3e2ffe72dc81397ec535723838b2116d64f..cc0418c4658201ff53f6b23271c89b073f39033a 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-01  Jakub Jelinek  <jakub@redhat.com>
+
+       * gcc.target/i386/i386.exp (check_effective_target_sse5): Use __v8hi
+       rather than __v2di type.
+
 2007-12-31  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/34558
index 7cf13ab74438397ecc43f57ab450a2ace8d978ef..7445477cc217dadde26358b9fd49bf3925b89920 100644 (file)
@@ -68,13 +68,13 @@ proc check_effective_target_sse4a { } {
 proc check_effective_target_sse5 { } {
     return [check_no_compiler_messages sse5 object {
        typedef long long __m128i __attribute__ ((__vector_size__ (16)));
-       typedef long long __v2di __attribute__ ((__vector_size__ (16)));
+       typedef short __v8hi __attribute__ ((__vector_size__ (16)));
 
        __m128i _mm_maccs_epi16(__m128i __A, __m128i __B, __m128i __C)
        {
-           return (__m128i) __builtin_ia32_pmacssww ((__v2di)__A,
-                                                     (__v2di)__B,
-                                                     (__v2di)__C);
+           return (__m128i) __builtin_ia32_pmacssww ((__v8hi)__A,
+                                                     (__v8hi)__B,
+                                                     (__v8hi)__C);
        }
     } "-O2 -msse5" ]
 }