aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-tree.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-01-31 09:20:34 +0100
committerJakub Jelinek <jakub@redhat.com>2023-01-31 09:20:34 +0100
commit41602390456901c14ecdfa2fa64c3cebd5b6ff09 (patch)
tree3ebbe3ba0129daf2658325eafbec3e07556e98f3 /gcc/rust/backend/rust-tree.cc
parenta190f583050630802438bce9aa854fdfa7a4433c (diff)
downloadgcc-41602390456901c14ecdfa2fa64c3cebd5b6ff09.zip
gcc-41602390456901c14ecdfa2fa64c3cebd5b6ff09.tar.gz
gcc-41602390456901c14ecdfa2fa64c3cebd5b6ff09.tar.bz2
i386: Fix up -Wuninitialized warnings in avx512erintrin.h [PR105593]
As reported in the PR, there are some -Wuninitialized warnings in avx512erintrin.h. One can see that by compiling sse-23.c testcase with -Wuninitialized (or when actually using those intrinsics). Those 6 spots use an uninitialized variable and pass it as one of the argument to a builtin with constant mask -1, because there is no unmasked builtin. It is true that expansion of those builtins into RTL will see mask is all ones and ignore the unneeded argument, but -Wuninitialized is diagnosed on GIMPLE and on GIMPLE these builtins are just builtin calls. avx512fintrin.h and other headers use in these cases the _mm*_undefined_* () intrinsics, like: return (__m512i) __builtin_ia32_psrav8di_mask ((__v8di) __X, (__v8di) __Y, (__v8di) _mm512_undefined_epi32 (), (__mmask8) -1); etc. and the following patch does the same for avx512erintrin.h. With the recent changes in C++ FE and the _mm*_undefined_* intrinsics, we don't emit -Wuninitialized warnings for those (previously we didn't just in C due to self-initialization). Of course we could also just self-initialize these uninitialized vars and add the #pragma GCC diagnostic dances around it, but using the intrinsics is consistent with the rest and IMHO cleaner. 2023-01-31 Jakub Jelinek <jakub@redhat.com> PR c++/105593 * config/i386/avx512erintrin.h (_mm512_exp2a23_round_pd, _mm512_exp2a23_round_ps, _mm512_rcp28_round_pd, _mm512_rcp28_round_ps, _mm512_rsqrt28_round_pd, _mm512_rsqrt28_round_ps): Use _mm512_undefined_pd () or _mm512_undefined_ps () instead of using uninitialized automatic variable __W. * gcc.target/i386/sse-23.c: Add -Wuninitialized to dg-options.
Diffstat (limited to 'gcc/rust/backend/rust-tree.cc')
0 files changed, 0 insertions, 0 deletions