Skip to content
Commit 32a8e04c authored by Arseny Kapoulkine's avatar Arseny Kapoulkine Committed by Steven Perron
Browse files

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.
parent 0e9f2f94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment