On Mon, 3 Mar 2014, Richard Biener wrote:

How do you handle a
transformation that currently tries to recursively fold something else and
does the main transformation only if that simplified?

And doesn't do the other folding (because it's not in the IL literally?)?
Similar to the cst without overflow case, by writing custom C code
and allowing that to signal failure.

Note that for this kind of simplification, it can be inconvenient to have canonicalization included with the "real" simplifications. Imagine I am looking at (x?3:5)+y. If 3+y "simplifies" to y+3 and 5+y "simplifies" to y+5, then it looks worth it to replace the expression with x?y+3:(y+5).

Would there be a convenient way to separate them, so it can tell me that 3+y should be replaced with y+3 but that it is not a simplification?

--
Marc Glisse

Reply via email to