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] x86: _mm*_undefined_* (for real)


Hello Ulrich,
On 21 Mar 06:41, Ulrich Drepper wrote:
> This is a tested version of the patch I sent before.  I'm using the
> 
>    type var = var
> 
> trick for the initialization so far even those this is not ideal as I
> have shown in one of the emails before.  If anyone could work  on a real
> solution we could get even better code generation.
> 
> In the meantime, the patch should be fine.  I've bootstrapped the
> compiler on x86-64.  The patch adds the _mm*_undefined_* definitions and
> uses them where appropriate.  Most of the related changes are cleanups.
> In some cases completely uninitialized variables are used and I consider
> that code buggy.  So the patch is actually also a bug fix.
> 
> 
> 2014-03-19  Ulrich Drepper  <drepper@gmail.com>
> 
>         * config/i386/avxintrin.h (_mm256_undefined_si256): Define.
>         (_mm256_undefined_ps): Define.
>         (_mm256_undefined_pd): Define.
>         * config/i386/emmintrin.h (_mm_undefined_si128): Define.
>         (_mm_undefined_pd): Define.
>         * config/i386/xmmintrin.h (_mm_undefined_ps): Define.
>         * config/i386/avx512fintrin.h (_mm512_undefined_si512): Define.
>         (_mm512_undefined_ps): Define.
>         (_mm512_undefined_pd): Define.
>         Use _mm*_undefined_*.
>         * config/i386/avx2intrin.h: Use _mm*_undefined_*.
> 
> 
> Anyone having a problem with the patch?  
I've tried your patch with AVX-512 simulator and see no new regressions.

> until after the release?  I found a few more intrinsics which are
> missing and I'll have more patches. 
If list of missing intrinsics is big - maybe you could share it? I can
help you implementing it.

In general, I think _undefined idea is correct and the patch is doing most
important thing - it localizes undef semantics in couple of built-ins.
However I don't know which code is optimal to model undef behaviour.

--
Thanks, K


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