nir/nir: Fix a bug in move_successors
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 8 Nov 2014 02:25:08 +0000 (18:25 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Jan 2015 15:19:01 +0000 (07:19 -0800)
commitdc4e660dfad86aa8cdd08a5ec8b9890095de7c07
tree9a888d9290197d328e9eb7cdcfd35c271b5da075
parent2bd5a24a5e440ba0072528fdb32892cf8c935a8e
nir/nir: Fix a bug in move_successors

The unlink_blocks function moves successors around to make sure that, if
there is a remaining successor, it is in the first successors slot and not
the second.  To fix this, we simply get both successors up front.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir.c