Skip to content

Commit 437b4f2

Browse files
committed
x86 sse2,sse3, avx: silence some false-positive warnings about unitialized structs
1 parent fb20a06 commit 437b4f2

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

simde/x86/sse2.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3793,6 +3793,11 @@ simde_mm_load_si128 (simde__m128i const* mem_addr) {
37933793
#define _mm_load_si128(mem_addr) simde_mm_load_si128(mem_addr)
37943794
#endif
37953795

3796+
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_)
3797+
HEDLEY_DIAGNOSTIC_PUSH
3798+
SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_
3799+
#endif
3800+
37963801
SIMDE_FUNCTION_ATTRIBUTES
37973802
simde__m128d
37983803
simde_mm_loadh_pd (simde__m128d a, simde_float64 const* mem_addr) {
@@ -3824,6 +3829,10 @@ simde_mm_loadh_pd (simde__m128d a, simde_float64 const* mem_addr) {
38243829
#define _mm_loadh_pd(a, mem_addr) simde_mm_loadh_pd(a, mem_addr)
38253830
#endif
38263831

3832+
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_)
3833+
HEDLEY_DIAGNOSTIC_POP
3834+
#endif
3835+
38273836
SIMDE_FUNCTION_ATTRIBUTES
38283837
simde__m128i
38293838
simde_mm_loadl_epi64 (simde__m128i const* mem_addr) {

simde/x86/sse3.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,11 @@ simde_mm_movedup_pd (simde__m128d a) {
479479
# define _mm_movedup_pd(a) simde_mm_movedup_pd(a)
480480
#endif
481481

482+
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_)
483+
HEDLEY_DIAGNOSTIC_PUSH
484+
SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_
485+
#endif
486+
482487
SIMDE_FUNCTION_ATTRIBUTES
483488
simde__m128
484489
simde_mm_movehdup_ps (simde__m128 a) {
@@ -543,6 +548,10 @@ simde_mm_moveldup_ps (simde__m128 a) {
543548
# define _mm_moveldup_ps(a) simde_mm_moveldup_ps(a)
544549
#endif
545550

551+
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_)
552+
HEDLEY_DIAGNOSTIC_POP
553+
#endif
554+
546555
SIMDE_END_DECLS_
547556

548557
HEDLEY_DIAGNOSTIC_POP

test/x86/avx.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14945,6 +14945,11 @@ test_simde_mm256_sub_pd(SIMDE_MUNIT_TEST_ARGS) {
1494514945
return 0;
1494614946
}
1494714947

14948+
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_)
14949+
HEDLEY_DIAGNOSTIC_PUSH
14950+
SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_
14951+
#endif
14952+
1494814953
static int
1494914954
test_simde_mm256_undefined_ps(SIMDE_MUNIT_TEST_ARGS) {
1495014955
simde__m256 r;
@@ -14983,6 +14988,10 @@ test_simde_mm256_undefined_si256(SIMDE_MUNIT_TEST_ARGS) {
1498314988
return 0;
1498414989
}
1498514990

14991+
#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_)
14992+
HEDLEY_DIAGNOSTIC_POP
14993+
#endif
14994+
1498614995
static int
1498714996
test_simde_mm256_unpackhi_ps(SIMDE_MUNIT_TEST_ARGS) {
1498814997
const struct {

0 commit comments

Comments
 (0)