<div dir="ltr"><div>I'm not convinced that code is correct. In particular, the bit_size value is for the destination and not necessarily that one source. As Karol points out, it probably is safe to just delete. However, I'd feel slightly better about it if we figured out the right bit size and just called nir_eval_const_opcode to do a u2u32 on the value.</div><div><br></div><div>--Jason<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 17, 2019 at 1:24 AM Karol Herbst <<a href="mailto:kherbst@redhat.com">kherbst@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">ohhh, yeah.. I think we can actually just remove that code, as it<br>
shouldn't have any affect on the constants value.<br>
<br>
On Fri, May 17, 2019 at 4:07 AM Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>> wrote:<br>
><br>
> I think it's fine but I'm not at my computer right now.<br>
><br>
> --Jason<br>
><br>
> On May 16, 2019 20:58:03 Dave Airlie <<a href="mailto:airlied@gmail.com" target="_blank">airlied@gmail.com</a>> wrote:<br>
><br>
> > Coverity gave me this:<br>
> ><br>
> > mesa-19.1.0-rc2/src/compiler/spirv/spirv_to_nir.c:1987:<br>
> > overlapping_assignment: Assigning "src[1][i].u8" to "src[1][i].u32",<br>
> > which have overlapping memory locations and different types.<br>
> ><br>
> > and the following lines, I think it's actually undefined behaviour wrt<br>
> > the C spec.<br>
> ><br>
> > Dave.<br>
><br>
><br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>