public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r8-10876] rs6000: Fix up __m64 typedef in mmintrin.h [PR97301]
Date: Thu, 22 Apr 2021 16:50:03 +0000 (GMT)	[thread overview]
Message-ID: <20210422165003.E1A9B3A3E419@sourceware.org> (raw)

https://gcc.gnu.org/g:254b1a5abcad1d6d2f3c249cb8724004c51d80e9

commit r8-10876-g254b1a5abcad1d6d2f3c249cb8724004c51d80e9
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sat Jan 23 09:41:58 2021 +0100

    rs6000: Fix up __m64 typedef in mmintrin.h [PR97301]
    
    The x86 __m64 type is defined as:
    /* 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__));
    and so matches the comment above it in that reads and stores through
    pointers to __m64 can alias anything.
    But in the rs6000 headers that is the case only for __m128, but not __m64.
    
    The following patch adds that attribute, which fixes the
    FAIL: gcc.target/powerpc/sse-movhps-1.c execution test
    FAIL: gcc.target/powerpc/sse-movlps-1.c execution test
    regressions that appeared when Honza improved ipa-modref.
    
    2021-01-23  Jakub Jelinek  <jakub@redhat.com>
    
            PR testsuite/97301
            * config/rs6000/mmintrin.h (__m64): Add __may_alias__ attribute.
    
    (cherry picked from commit db9a3ce7b83ce3ed3e0ffe7eb7a918595640e161)

Diff:
---
 gcc/config/rs6000/mmintrin.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/config/rs6000/mmintrin.h b/gcc/config/rs6000/mmintrin.h
index 497ecdf7895..0bcad939fb3 100644
--- a/gcc/config/rs6000/mmintrin.h
+++ b/gcc/config/rs6000/mmintrin.h
@@ -58,7 +58,8 @@
 #include <altivec.h>
 /* The Intel API is flexible enough that we must allow aliasing with other
    vector types, and their scalar components.  */
-typedef __attribute__ ((__aligned__ (8))) unsigned long long __m64;
+typedef __attribute__ ((__aligned__ (8),
+			__may_alias__)) unsigned long long __m64;
 
 typedef __attribute__ ((__aligned__ (8)))
 union


                 reply	other threads:[~2021-04-22 16:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210422165003.E1A9B3A3E419@sourceware.org \
    --to=jakub@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).