nir/opt_remove_phis: handle phis with no sources
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 23 Sep 2019 13:48:22 +0000 (14:48 +0100)
committerRhys Perry <pendingchaos02@gmail.com>
Wed, 25 Sep 2019 00:58:30 +0000 (00:58 +0000)
commit12372d60fff676c458c7a54a934f619548337f0e
tree895d3f2301167620986111505ea7a888acb22fa1
parent67d930d64bb27944f4ad02068720a832c503ab1f
nir/opt_remove_phis: handle phis with no sources

This can happen with loops with unreachable exits which are later
optimized away.

Fixes assertion in dEQP-VK.graphicsfuzz.unreachable-loops with RADV.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_opt_remove_phis.c