On Fri, Nov 15, 2024 at 04:04:55PM +0800, Hongyu Wang wrote: > Following the discussion in pr116738, the insn for UNSPEC_IEEE_MAXMIN > actually matches the behavior of if_then_else, so remove the UNSPEC and > rewrite related pattern with if_then_else.
I'm not sure if it is necessarily always a win. It has an advantage that simplify-rtx can simplify it if the operands are constant and better describes what's going on. The disadvantage I see is that it has multiple uses of the operands, each operand is used twice rather than once in the pattern, which could lead to combiner or other optimizations giving up on it. So, do you see any code generation changes with this patch on something larger? Jakub