Message ID | 20200921080803.GF6758@kam.mff.cuni.cz |
---|---|
State | New |
Headers | show |
Series | Fix sse2-andnpd-1.c, avx-vandnps-1.c and sse-andnps-1.c testscases | expand |
On Mon, 21 Sep 2020, Jan Hubicka wrote: > Hi, > 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) \ > { \ >
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) \ { \