Skip to content

nir_opt_dead_cf: Remove dead ifs

Jesse Natalie requested to merge jenatali/mesa:nir-opt-cf-dead-if into main

An if that looks like:

if (x) { } else { }

That has no phis following it is dead. Currently these are only removed by peephole select, but that means that 'x' is considered used until that pass is run, which can make it difficult to apply sane lowering in the case where loading 'x' requires complex or expensive transformations, but 'x' is really unused.

Merge request reports