nir/cf: Fix unlink_block_successors to actually unlink the second one.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 2 Sep 2015 05:56:29 +0000 (22:56 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 23 Sep 2015 18:00:00 +0000 (11:00 -0700)
commit6560838703431f89c47d68822758bc76fd34c355
treefa324f6bf4880e6741fcf7d5072c6bfc060f8d59
parent024e5ec9777c38f8c05be6678a9f51b145a00236
nir/cf: Fix unlink_block_successors to actually unlink the second one.

Calling unlink_blocks(block, block->successors[0]) will successfully
unlink the first successor, but then will shift block->successors[1]
down to block->successor[0].  So the successors[1] != NULL check will
always fail.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/glsl/nir/nir_control_flow.c