On Fri, Jul 21, 2017 at 8:24 PM, Andrew Pinski <pins...@gmail.com> wrote:
> Hi,
>   Due to the way bit-field access lower is done, we can get an
> unitialized memory load and this causes the unitialized warning to
> kick in.
> The case we have is:
> temp_1 = BIT_FIELD_REF<a, 0, 64>
> temp_2 = BIT_INSERT<temp_1, V, P (N bits)>
> BIT_FIELD_REF<a, 0, 64> = temp_2
>
> What this patch does is similar to what was done for the case of
> BIT_INSERT for unitialized ssa names (default) but for memory
> accesses.
> Note also tested with the bit-field lower pass added; this and the
> fold-const.c/tree-ssa-sccvn.c patch (which was just committed) are
> requirements to the lower pass.
>
> OK?  Bootstrapped and tested on aarch64-linux-gnu with no regressions.

Ok.

Thanks,
Richard.

> Thanks,
> Andrew Pinski
> * tree-ssa-uninit.c (warn_uninitialized_vars): Don't warn about memory
> accesses where the use is for the first operand of a BIT_INSERT.

Reply via email to