testsuite: Avoid strict aliasing violations in some avx512 tests
authorJakub Jelinek <jakub@redhat.com>
Tue, 8 Dec 2020 10:19:49 +0000 (11:19 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 8 Dec 2020 10:19:49 +0000 (11:19 +0100)
commit4c6a47c7dd010f4694097638a1763aa3c5e9a37c
treeee524795107a90963e794441c35773d197f126dc
parent19c1ef85c3f9be7c78682135ed1f59cd093b4684
testsuite: Avoid strict aliasing violations in some avx512 tests

These tests violated strict aliasing, fixed by using a union and
type punning through that.

2020-12-08  Jakub Jelinek  <jakub@redhat.com>

* gcc.target/i386/avx512dq-vandnpd-2.c (CALC): Use union
to avoid aliasing violations.
* gcc.target/i386/avx512dq-vandnps-2.c (CALC): Likewise.
* gcc.target/i386/avx512dq-vandpd-2.c (CALC): Likewise.
* gcc.target/i386/avx512dq-vandps-2.c (CALC): Likewise.
* gcc.target/i386/avx512dq-vorpd-2.c (CALC): Likewise.
* gcc.target/i386/avx512dq-vorps-2.c (CALC): Likewise.
* gcc.target/i386/avx512dq-vxorpd-2.c (CALC): Likewise.
* gcc.target/i386/avx512dq-vxorps-2.c (CALC): Likewise.
gcc/testsuite/gcc.target/i386/avx512dq-vandnpd-2.c
gcc/testsuite/gcc.target/i386/avx512dq-vandnps-2.c
gcc/testsuite/gcc.target/i386/avx512dq-vandpd-2.c
gcc/testsuite/gcc.target/i386/avx512dq-vandps-2.c
gcc/testsuite/gcc.target/i386/avx512dq-vorpd-2.c
gcc/testsuite/gcc.target/i386/avx512dq-vorps-2.c
gcc/testsuite/gcc.target/i386/avx512dq-vxorpd-2.c
gcc/testsuite/gcc.target/i386/avx512dq-vxorps-2.c