re PR target/31245 (SSE2 generation bug with 4.1.2 and -O3)
authorRichard Henderson <rth@redhat.com>
Wed, 21 Mar 2007 15:52:23 +0000 (08:52 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 21 Mar 2007 15:52:23 +0000 (08:52 -0700)
        PR target/31245
        * config/i386/emmintrin.h (__m128i, __m128d): Mark may_alias.
        * config/i386/mmintrin.h (__m64): Likewise.
        * config/i386/xmmintrin.h (__m128): Likewise.

From-SVN: r123112

gcc/ChangeLog
gcc/config/i386/emmintrin.h
gcc/config/i386/mmintrin.h
gcc/config/i386/xmmintrin.h

index 5d93c7d6c518323d9ec48cd0a5e068bba2329990..a53840e9793f962750395d3164c9aa6cff39f1af 100644 (file)
@@ -1,3 +1,10 @@
+2007-03-21  Richard Henderson  <rth@redhat.com>
+
+       PR target/31245
+       * config/i386/emmintrin.h (__m128i, __m128d): Mark may_alias.
+       * config/i386/mmintrin.h (__m64): Likewise.
+       * config/i386/xmmintrin.h (__m128): Likewise.
+
 2007-03-21  Richard Sandiford  <richard@codesourcery.com>
 
        * config/vxworks.h (VXWORKS_ADDITIONAL_CPP_SPEC): Remove -D options.
index 43a626236445aaf17380ecb0edb53ccaf47adefe..002e16c9b95e128f1a7018171e8f917b2b1ac061 100644 (file)
@@ -44,8 +44,10 @@ typedef int __v4si __attribute__ ((__vector_size__ (16)));
 typedef short __v8hi __attribute__ ((__vector_size__ (16)));
 typedef char __v16qi __attribute__ ((__vector_size__ (16)));
 
-typedef __v2di __m128i;
-typedef __v2df __m128d;
+/* The Intel API is flexible enough that we must allow aliasing with other
+   vector types, and their scalar components.  */
+typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
+typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__));
 
 /* Create a selector for use with the SHUFPD instruction.  */
 #define _MM_SHUFFLE2(fp1,fp0) \
index 1a74271f64831067ee3920f9326d2acc341d69d3..052198d71d93f5a13eb7906e3a2c15c865747d84 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
    Free Software Foundation, Inc.
 
    This file is part of GCC.
@@ -34,8 +34,9 @@
 #ifndef __MMX__
 # error "MMX instruction set not enabled"
 #else
-/* The data type intended for user use.  */
-typedef int __m64 __attribute__ ((__vector_size__ (8)));
+/* The Intel API is flexible enough that we must allow aliasing with other
+   vector types, and their scalar components.  */
+typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__));
 
 /* Internal data types for implementing the intrinsics.  */
 typedef int __v2si __attribute__ ((__vector_size__ (8)));
index 48b177c2a5e8e58f25b3e7aa06f972d50374a0e2..57ef330b128fd85a747a297dafa6ee73d62f1710 100644 (file)
@@ -41,8 +41,9 @@
 /* Get _mm_malloc () and _mm_free ().  */
 #include <mm_malloc.h>
 
-/* The data type intended for user use.  */
-typedef float __m128 __attribute__ ((__vector_size__ (16)));
+/* The Intel API is flexible enough that we must allow aliasing with other
+   vector types, and their scalar components.  */
+typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
 
 /* Internal data types for implementing the intrinsics.  */
 typedef float __v4sf __attribute__ ((__vector_size__ (16)));