From 0e960ba8e5be2a2bfaacc6a085795f9a1b19567a Mon Sep 17 00:00:00 2001 From: rth Date: Wed, 21 Mar 2007 15:52:23 +0000 Subject: [PATCH] PR target/31245 * config/i386/emmintrin.h (__m128i, __m128d): Mark may_alias. * config/i386/mmintrin.h (__m64): Likewise. * config/i386/xmmintrin.h (__m128): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123112 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/emmintrin.h | 6 ++++-- gcc/config/i386/mmintrin.h | 7 ++++--- gcc/config/i386/xmmintrin.h | 5 +++-- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d93c7d6c51..a53840e9793 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2007-03-21 Richard Henderson + + 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 * config/vxworks.h (VXWORKS_ADDITIONAL_CPP_SPEC): Remove -D options. diff --git a/gcc/config/i386/emmintrin.h b/gcc/config/i386/emmintrin.h index 43a62623644..002e16c9b95 100644 --- a/gcc/config/i386/emmintrin.h +++ b/gcc/config/i386/emmintrin.h @@ -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) \ diff --git a/gcc/config/i386/mmintrin.h b/gcc/config/i386/mmintrin.h index 1a74271f648..052198d71d9 100644 --- a/gcc/config/i386/mmintrin.h +++ b/gcc/config/i386/mmintrin.h @@ -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))); diff --git a/gcc/config/i386/xmmintrin.h b/gcc/config/i386/xmmintrin.h index 48b177c2a5e..57ef330b128 100644 --- a/gcc/config/i386/xmmintrin.h +++ b/gcc/config/i386/xmmintrin.h @@ -41,8 +41,9 @@ /* Get _mm_malloc () and _mm_free (). */ #include -/* 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))); -- 2.11.0