aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-01-22 22:38:31 +0100
committerJakub Jelinek <jakub@redhat.com>2021-01-22 22:38:31 +0100
commitd08677c11dc4b43cc8bab862d1c986563897ce3f (patch)
treec12886e730605a6175f5f931ac8d514bf86fb66b /gcc
parentb485fa167ef35c8facbd7c21cb86fd1abc77efcf (diff)
downloadgcc-d08677c11dc4b43cc8bab862d1c986563897ce3f.zip
gcc-d08677c11dc4b43cc8bab862d1c986563897ce3f.tar.gz
gcc-d08677c11dc4b43cc8bab862d1c986563897ce3f.tar.bz2
testsuite: Fix sse2-andnpd-1.c and sse-andnps-1.c testscases on powerpc
On Mon, Sep 21, 2020 at 10:12:20AM +0200, Richard Biener wrote: > On Mon, 21 Sep 2020, Jan Hubicka wrote: > > these testcases now fails because they contains an invalid type puning > > that happens via const VALUE_TYPE *v pointer. Since the check function > > is noinline, modref is needed to trigger the wrong code. > > I think it is easiest to fix it by no-strict-aliasing. > > > > Regtested x86_64-linux, OK? > > OK. > > > * gcc.target/i386/m128-check.h: Add no-strict aliasing to > > CHECK_EXP macro. > > > > diff --git a/gcc/testsuite/gcc.target/i386/m128-check.h b/gcc/testsuite/gcc.target/i386/m128-check.h > > index 48b23328539..6f414b07be7 100644 > > --- a/gcc/testsuite/gcc.target/i386/m128-check.h > > +++ b/gcc/testsuite/gcc.target/i386/m128-check.h > > @@ -78,6 +78,7 @@ typedef union > > > > #define CHECK_EXP(UINON_TYPE, VALUE_TYPE, FMT) \ > > static int \ > > +__attribute__((optimize ("no-strict-aliasing"))) \ > > __attribute__((noinline, unused)) \ > > check_##UINON_TYPE (UINON_TYPE u, const VALUE_TYPE *v) \ > > { \ On powerpc64le the tests suffer from the exact same issue. 2021-01-22 Jakub Jelinek <jakub@redhat.com> * gcc.target/powerpc/m128-check.h (check_##UINON_TYPE): Add optimize ("no-strict-aliasing") attribute.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.target/powerpc/m128-check.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/m128-check.h b/gcc/testsuite/gcc.target/powerpc/m128-check.h
index fcb631a..3df9652 100644
--- a/gcc/testsuite/gcc.target/powerpc/m128-check.h
+++ b/gcc/testsuite/gcc.target/powerpc/m128-check.h
@@ -85,6 +85,7 @@ typedef union
#define CHECK_EXP(UINON_TYPE, VALUE_TYPE, FMT) \
static int \
+__attribute__((optimize ("no-strict-aliasing"))) \
__attribute__((noinline, unused)) \
check_##UINON_TYPE (UINON_TYPE u, const VALUE_TYPE *v) \
{ \