[Mesa-dev] [PATCH 2/2] nir: fix bug with moves in nir_opt_remove_phis()
Kenneth Graunke
kenneth at whitecape.org
Sat Sep 3 03:57:32 UTC 2016
On Friday, September 2, 2016 7:28:09 PM PDT Connor Abbott wrote:
> In 144cbf8 ("nir: Make nir_opt_remove_phis see through moves."), Ken
> made nir_opt_remove_phis able to coalesce phi nodes whose sources are
> all moves with the same swizzle. However, he didn't add the logic
> necessary for handling the fact that the phi may now have multiple
> different sources, even though the sources point to the same thing. For
> example, if we had something like:
>
> if (...)
> a1 = b.yx;
> else
> a2 = b.yx;
> a = phi(a1, a2)
> ... = a
>
> then we would rewrite it to
>
> if (...)
> a1 = b.yx;
> else
> a2 = b.yx;
> ... = a1
>
> by picking a random phi source, which in this case is invalid because
> the source doesn't dominate the phi. Instead, we need to change it to:
>
> if (...)
> a1 = b.yx;
> else
> a2 = b.yx;
> a3 = b.yx;
> ... = a3;
Fixes 12 CTS tests:
ES31-CTS.functional.tessellation.invariance.outer_edge_symmetry.quads*
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160902/a073c843/attachment.sig>
More information about the mesa-dev
mailing list