Open
Description
We often unpack values from unorm4x8 in vc4, and we know that those will be between 0.0 and 1.0 so a min(unpack_unorm4x8(a), 1.0)
is unnecessary (this pattern appears in vertex shaders a lot). It would be good to have a NIR pass that tracks the ranges of values and removes extra instructions. A GSOC student did some work on this at https://github.com/thohel/mesa/commits/gsoc-final-range-prop but I found the code very hard to review and it languished.