> -----Original Message-----
> From: Eelco Chaudron <[email protected]>
> Sent: Wednesday, July 14, 2021 10:12 AM
> To: Amber, Kumar <[email protected]>; Aaron Conole
> <[email protected]>
> Cc: [email protected]; [email protected]; [email protected]; Van 
> Haaren,
> Harry <[email protected]>; Ferriter, Cian <[email protected]>;
> Stokes, Ian <[email protected]>
> Subject: Re: [v11 10/11] dpif-netdev/mfex: Add AVX512 based optimized miniflow
> extract

<snip>

> > +        /* Permute the packet layout into miniflow blocks shape.
> > +         * As different AVX512 ISA levels have different implementations,
> > +         * this specializes on the "use_vbmi" attribute passed in.
> > +         */
> > +        __m512i v512_zeros = _mm512_setzero_si512();
> > +        __m512i v_blk0 = v512_zeros;
> 
> Although I did ACK this patchset, running make clang-analyzer, gave me the
> following warning, which should be fixed:
> 
> lib/dpif-netdev-extract-avx512.c:476:17: warning: Value stored to 'v_blk0' 
> during its
> initialization is never read
>         __m512i v_blk0 = v512_zeros;
>                 ^~~~~~   ~~~~~~~~~~
> 1 warning generated.

Ah interesting, indeed its never read. Its also a "zeroed" register, so it has 
no runtime
performance impact. (Magic of OoO execution, combined with register renaming :)

The fix is simply to remove the " = v512_zeros;" part, resulting in this decl 
of the variable from
__m512i v_blk0 = v512_zeros;
to
__m512i v_blk0;

Will be included in v11.


> Aaron, would it be possible to add a clang-analyzer run to the zero robot to 
> catch
> newly introduced warnings?

That'd be cool. I presume that a "scan-build" prefix to the build command is 
all that's
needed, as usually the case with clang analyzer. Reproduced the above error 
using
scan-build, so that seems to work :)

Regards, -Harry

<snip remaining patch>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to