Fold FMix feeding Extract, and use the simplification pass.
We add a new rule to the folding rules to fold an FMix feeding an extract when the alpha value for the element being extracted is either 0 or 1. In those case, we can simple extract from one of the operands to the FMix. With that change the simplification pass completely subsumes the insert-extract elimination pass. So we remove the insert-extract elimination passes and replce them with calls to the simplification pass. In a follow up PR, we should delete the insert-extract elimination pass. Contributes to https://github.com/KhronosGroup/SPIRV-Tools/issues/1570.
Loading
Please register or sign in to comment