This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386] PR63211 broken type-punning in avx* tests.


On 04/04/2015 02:08 AM, Uros Bizjak wrote:
On Fri, Apr 3, 2015 at 4:52 PM, Ilya Tocar <tocarip.intel@gmail.com> wrote:
On 03 Apr 13:39, Uros Bizjak wrote:
On Fri, Apr 3, 2015 at 1:02 PM, Ilya Tocar <tocarip.intel@gmail.com> wrote:

I've looked into avx* tests and many of them (even those that don't fail
in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63211) use invalid type
punning. Properly fixing them looks like a lot of work, so I propose
just adding  -fno-strict-aliasing to them.
This patch was obtained by running
sed -i "s/-O2/-O2  -fno-strict-aliasing/g" ../gcc/testsuite/gcc.target/i386/avx*-2.c

Ok for stage1?

I don't like this approach. If the testcase is broken, then it should
be fixed, not worked around.

IMHO those tests don't need to be alias conformant.
There are plenty of tests for aliasing rules,
and avx tests verify intrinsics implementaion. There are plenty of real
programs braking alias rules, so why can't we have non-conformant tests?

I don't agree with the above. Tests have to be conformant, no matter
what they test. Recent c11 cleanup is an example, where all
non-conformant tests were fixed to be c11 conformant (in contrast to
only slapping -std=c89 into their flags).

The deviation from the above rule has to be approved from the
testsuite maintainers. It represents possible maintenance issue in the
future.
It's certainly preferable for tests to be conforming if they can easily be made so without compromising the test.

So that's what I'd weigh -- how painful is fixing the aliasing issues and how likely is it that in doing so that the test gets compromised?

Ultimately it's your call though.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]