Add folding of redundant OpSelect insns
We can fold OpSelect into one of the operands in two cases: - condition is constant - both results are the same Even if the original shader doesn't have either of these, if-conversion pass sometimes ends up generating instructions like %7127 = OpSelect %int %3220 %7058 %7058 And this optimization cleans them up.
Loading
Please register or sign in to comment