This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] x86: _mm*_undefined_* (for real)
- From: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- To: Ulrich Drepper <drepper at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 24 Mar 2014 10:31:33 +0400
- Subject: Re: [PATCH] x86: _mm*_undefined_* (for real)
- Authentication-results: sourceware.org; auth=none
- References: <87r45vygtj dot fsf at x240 dot local dot i-did-not-set--mail-host-address--so-tickle-me>
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