This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix memory alignment on AVX512VL masked floating point stores (PR target/69198)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 8 Jan 2016 13:43:37 -0800
- Subject: Re: [PATCH] Fix memory alignment on AVX512VL masked floating point stores (PR target/69198)
- Authentication-results: sourceware.org; auth=none
- References: <20160108202056 dot GG18720 at tucnak dot redhat dot com> <CAMe9rOq_HCpUzfcp-hN9p-yTUpgM-1u983=j0hOQYof7Y9Vefg at mail dot gmail dot com> <20160108203539 dot GH18720 at tucnak dot redhat dot com> <CAMe9rOrhjZQk1SArCskK9Y5ygeGUuwt_kH5XDUucU7joM+0Cdw at mail dot gmail dot com> <20160108204422 dot GJ18720 at tucnak dot redhat dot com> <CAMe9rOrJJGY+tt_sFzMj4sEcw4J5PGaPUAyY8yP5F51Wy_uaDg at mail dot gmail dot com> <20160108204802 dot GK18720 at tucnak dot redhat dot com> <CAMe9rOp03H_HpSxE-5C7mktGW4tvGzD_JR8bS=C2V99UaZ5CgA at mail dot gmail dot com> <20160108212352 dot GM18720 at tucnak dot redhat dot com> <CAMe9rOrCswTN_RgjeDaUvXFVaqhcyHxorwdWmM=JpP1OiTSgnQ at mail dot gmail dot com> <20160108213826 dot GN18720 at tucnak dot redhat dot com>
On Fri, Jan 8, 2016 at 1:38 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Jan 08, 2016 at 01:27:08PM -0800, H.J. Lu wrote:
>> > That is just wrong and will severely pessimize correct code.
>> > Please don't waste time on that.
>> >
>>
>> Do you have an example to show it will pessimize correct code?
>
> Anything where the compiler can't figure out alignment info and you use the
> aligned functions, starting from trivial tests like:
>
> void foo (float *p, __m256 q)
> {
> _mm256_store_ps (p, q);
> }
>
> etc. The SSE*/AVX* docs say clearly that if the pointer argument is not
> properly aligned, a #GP is generated, and you need to use the
> *storeu*/*loadu* intrinsics instead.
>
How is it `correct' code when alignment of p is unknown? Do you
mean you are expecting GP.
--
H.J.