i386.c (standard_sse_constant_p): Accept vector and integer zeros too.
authorJan Hubicka <jh@suse,cz>
Tue, 22 Oct 2002 22:38:07 +0000 (22:38 +0000)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 22 Oct 2002 22:38:07 +0000 (22:38 +0000)
* i386.c (standard_sse_constant_p): Accept vector and integer zeros too.
* i386.h (EXTRA_CONSTRAINT): Recognize 'C'
* i386.md (movti_internal): Use 'C'

* xmmintrin.h (_mm_cmplt_epi*): New.

From-SVN: r58423

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/i386.md
gcc/config/i386/xmmintrin.h

index fbe10900b322dcae9b7e7e0dd85caeb6aeba969c..c1f445a23af74dc342fad6982bc4e8330e18714d 100644 (file)
@@ -1,3 +1,11 @@
+Wed Oct 23 00:33:11 CEST 2002  Jan Hubicka  <jh@suse,cz>
+
+       * i386.c (standard_sse_constant_p): Accept vector and integer zeros too.
+       * i386.h (EXTRA_CONSTRAINT): Recognize 'C'
+       * i386.md (movti_internal): Use 'C'
+
+       * xmmintrin.h (_mm_cmplt_epi*): New.
+
 2002-10-22  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/s390/s390.md ("*movdi_64"): Fix op_type attribute.
index 63e7f9570bec5b708552799104a2a383ee7cf132..efce0f3238213af431ca7089e2f063a3ce978ce2 100644 (file)
@@ -3749,8 +3749,8 @@ int
 standard_sse_constant_p (x)
      rtx x;
 {
-  if (GET_CODE (x) != CONST_DOUBLE)
-    return -1;
+  if (x == const0_rtx)
+    return 1;
   return (x == CONST0_RTX (GET_MODE (x)));
 }
 
index aabf3e531dfef489799972125a078dd1079bbf92..a679d3d469e5b2e7af6cf96407cd8e14cb171a67 100644 (file)
@@ -1425,9 +1425,10 @@ enum reg_class
    the constraint letter C.  If C is not defined as an extra
    constraint, the value returned should be 0 regardless of VALUE.  */
 
-#define EXTRA_CONSTRAINT(VALUE, C)                             \
-  ((C) == 'e' ? x86_64_sign_extended_value (VALUE, 0)          \
-   : (C) == 'Z' ? x86_64_zero_extended_value (VALUE)           \
+#define EXTRA_CONSTRAINT(VALUE, D)                             \
+  ((D) == 'e' ? x86_64_sign_extended_value (VALUE, 0)          \
+   : (D) == 'Z' ? x86_64_zero_extended_value (VALUE)           \
+   : (D) == 'C' ? standard_sse_constant_p (VALUE)              \
    : 0)
 
 /* Place additional restrictions on the register class to use when it
index b2aa4efb46ac25fc439575c0844606bb67ff3647..7e90501b445ac7a9b1f4957f752870db5ae07b23 100644 (file)
 
 (define_insn "movti_internal"
   [(set (match_operand:TI 0 "nonimmediate_operand" "=x,x,m")
-       (match_operand:TI 1 "general_operand" "O,xm,x"))]
+       (match_operand:TI 1 "general_operand" "C,xm,x"))]
   "TARGET_SSE && !TARGET_64BIT"
   "@
    xorps\t%0, %0
index f0f6ee3ee11f4e3954fb05d67ed9dd58e2975ed3..2740824cd90c5721ebd4cebd059fc160d5ab2028 100644 (file)
@@ -2307,6 +2307,24 @@ _mm_cmpeq_epi32 (__m128i __A, __m128i __B)
   return (__m128i)__builtin_ia32_pcmpeqd128 ((__v4si)__A, (__v4si)__B);
 }
 
+static __inline __m128i
+_mm_cmplt_epi8 (__m128i __A, __m128i __B)
+{
+  return (__m128i)__builtin_ia32_pcmpgtb128 ((__v16qi)__B, (__v16qi)__A);
+}
+
+static __inline __m128i
+_mm_cmplt_epi16 (__m128i __A, __m128i __B)
+{
+  return (__m128i)__builtin_ia32_pcmpgtw128 ((__v8hi)__B, (__v8hi)__A);
+}
+
+static __inline __m128i
+_mm_cmplt_epi32 (__m128i __A, __m128i __B)
+{
+  return (__m128i)__builtin_ia32_pcmpgtd128 ((__v4si)__B, (__v4si)__A);
+}
+
 static __inline __m128i
 _mm_cmpgt_epi8 (__m128i __A, __m128i __B)
 {