[Mesa-dev] [PATCH 23/24] i965/vec4: Replace src_reg(imm) constructors with brw_imm_*().
Matt Turner
mattst88 at gmail.com
Wed Nov 25 15:13:55 PST 2015
On Wed, Nov 25, 2015 at 2:48 PM, Matt Turner <mattst88 at gmail.com> wrote:
> The code seems fine to me. Here's what I see:
>
> We start with remaining_channels = WRITEMASK_XYZW. We initialize an
> element of imm[] for each enabled bit of inst->dst.writemask, and then
> we disable those bits from remaining_channels. When remaining_channels
> is zero (should be if and only if all elements of imm[] are
> initialized), we read imm[].
>
> Do you see anything wrong or anything I've missed?
>
> FWIW, Clang does not warn about this and doesn't warn if I remove the
> useless initializations of remaining_channels = 0 and inst_count = 0.
> I think this is gcc and Coverity just being stupid.
The attached file reproduces what I'm claiming is a gcc deficiency.
gcc-4.9.3 and gcc-5.2.0 will warn about data0 being uninitialized when
using -Wall. Clang does not.
I'll file a gcc bug.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: u.c
Type: text/x-csrc
Size: 255 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151125/ae344cfa/attachment.c>
More information about the mesa-dev
mailing list