https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110202
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |rtl-optimization Severity|normal |enhancement --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note you get a warning in your negate1 case <source>: In function '__m512i negate1(const __m512i*)': <source>:7:36: warning: 'res' is used uninitialized [-Wuninitialized] 7 | res = _mm512_ternarylogic_epi64(res, res, *a, 0x55); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ <source>:6:13: note: 'res' was declared here 6 | __m512i res; | ^~~ But even doing this: __m512i negate1(const __m512i *a) { __m512i res = _mm512_undefined_si512 (); res = _mm512_ternarylogic_epi64(res, res, *a, 0x55); return res; } Will cause an extra zeroing.