From c237d62ec50168812a39ed1b44f867b1dabfa2f5 Mon Sep 17 00:00:00 2001 From: dpatel Date: Tue, 4 Oct 2005 20:09:56 +0000 Subject: [PATCH] * c-common.c (vector_types_convertible_p): Check TYPE_PRECISION for real types. * gcc.dg/i386-sse-vect-types.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104958 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/c-common.c | 2 ++ gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/i386-sse-vect-types.c | 20 ++++++++++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/i386-sse-vect-types.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a97d43c..9395d52 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-10-04 Devang Patel + + * c-common.c (vector_types_convertible_p): Check TYPE_PRECISION for + real types. + 2005-10-04 Steve Ellcey * tree-vect-transform.c (vect_create_epilog_for_reduction): diff --git a/gcc/c-common.c b/gcc/c-common.c index 4b1f9e7..4114fbf 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -972,6 +972,8 @@ vector_types_convertible_p (tree t1, tree t2) return targetm.vector_opaque_p (t1) || targetm.vector_opaque_p (t2) || (tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2)) + && (TREE_CODE (t1) != REAL_TYPE || + TYPE_PRECISION (t1) == TYPE_PRECISION (t2)) && INTEGRAL_TYPE_P (TREE_TYPE (t1)) == INTEGRAL_TYPE_P (TREE_TYPE (t2))); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a397ea9..bc53511 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-10-04 Devang Patel + + * gcc.dg/i386-sse-vect-types.c: New. + 2005-10-04 Ian Lance Taylor PR preprocessor/13726 diff --git a/gcc/testsuite/gcc.dg/i386-sse-vect-types.c b/gcc/testsuite/gcc.dg/i386-sse-vect-types.c new file mode 100644 index 0000000..10a544d --- /dev/null +++ b/gcc/testsuite/gcc.dg/i386-sse-vect-types.c @@ -0,0 +1,20 @@ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ +/* { dg-options "-O0 -msse2" } */ + +/* Test the intrinsics without optimization. All of them are + defined as inline functions in mmintrin.h that reference the proper + builtin functions. Defining away "static" and "__inline" results in + all of them being compiled as proper functions. */ + +#define static +#define __inline + +#include + +__m128d foo1(__m128d z, __m128d a, int N) { + int i; + for (i=0; i