nir/spirv: handle if's with same label in both branches
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 24 Aug 2017 15:16:04 +0000 (17:16 +0200)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 12 Sep 2017 05:01:40 +0000 (07:01 +0200)
commit806ae6a648326327ead48d1b9aec6f44f74f06f9
tree192672233327612f7d84698e6a7d8d68ef4215a3
parent5666d3e3e5a5d598c5ea4a2b2d3682ef97c3f877
nir/spirv: handle if's with same label in both branches

When a conditional branch has the same labels in the "if" part and in the
"else" part, then we have the same cfg block, and it must be handled
once.

v2: handle it the same way as OpBranch (Jason).

Fixes:
dEQP-VK.spirv_assembly.instruction.compute.conditional_branch.same_labels*
dEQP-VK.spirv_assembly.instruction.graphics.conditional_branch.same_labels*

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/vtn_cfg.c