• Timothy Arceri's avatar
    nir: fix opt_if_loop_last_continue() · a2ec7888
    Timothy Arceri authored
    The pass did not correctly handle loops ending in:
    	if ssa_7 {
    		block block_8:
    		/* preds: block_7 */
    		/* succs: block_1 */
    	} else {
    		block block_9:
    		/* preds: block_7 */
    		/* succs: block_11 */
    The break will get eliminated by another opt but if this pass gets
    called first (as it does on RADV) we ended up inserting
    instructions after the break.
    Fixes: 5921a19d
     ("nir: add if opt opt_if_loop_last_continue()")
    Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
nir_opt_if.c 22.9 KB