nir: prevent peephole from generating invalid NIR
We can't append instructions following a return/halt instruction because the control flow helpers will modify the successor of the block containing the return/halt. And the NIR validator enforces that the return/halt must have the end of the function as successor.
This tends to happen following lower_shader_calls lowering which inserts halts. This probably doesn't prevent the optimization, it'll just happend in one of the returnshaders after the halt has been removed.
Signed-off-by: Lionel Landwerlin lionel.g.landwerlin@intel.com