The function was named "find_unconditional_discard", but didn't actually check that the discard statement found was unconditional. Fixes piglit glsl-fs-discard-04. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
It only cares about "if", "loop", and "discard".
NOTE: This is a candidate for the 7.9 branch.