Skip to content

nir: Lower returns correctly inside nested loops

Inside nested flow control, nir_lower_returns inserts predicated breaks in the outer block. However, it would omit doing this if the remainder of the outer block (after the inner block) was empty. This is not correct in the case of loops, as execution just wraps back around to the start of the loop, so this change doesn't skip the predication inside loops.

Fixes: 79dec93e (nir: Add return lowering pass) Closes: #2724 (closed)

Merge request reports