nir/spirv: skip unreachable blocks in Phi second pass
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 7 Nov 2019 08:33:09 +0000 (08:33 +0000)
committerJuan A. Suarez Romero <jasuarez@igalia.com>
Wed, 8 Jan 2020 10:32:24 +0000 (11:32 +0100)
commitad4fb7ea04158c68415f26f8cc573bfac16826a3
treea223d6c11aa22c69d883e35b03acd8ad0e80ff96
parent5f8daae4d829c9f734d2f41058990809d2dba349
nir/spirv: skip unreachable blocks in Phi second pass

Only the blocks that are reachable are inserted with an end_nop
instruction at the end.

When handling the Phi second pass, if the Phi has a parent block that
does not have an end_nop then it means this block is unreachable, and
thus we can ignore it, as the Phi will never come through it.

Fixes dEQP-VK.graphicsfuzz.uninit-element-cast-in-loop.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/spirv/vtn_cfg.c