Adds rewrite patterns to convert select+cmp instructions into clamp
instructions whenever possible. Support is added to convert:
- FOrdLessThan, FOrdLessThanEqual to GLSLFClampOp.
- SLessThan, SLessThanEqual to GLSLSClampOp.
- ULessThan, ULessThanEqual to GLSLUClampOp.
Nice! but I am not sure we want to add it for general canonicalizers. GLSL is an extension and you dont necessarily need to use it. Maybe put these patterns into another method
Then its upto client to use that. For testing this just create a simple pass that just runs those canonicalization patterns