On 9/2/23 01:00, Andrew Pinski via Gcc-patches wrote:
This allows removal of one conversion and in the case of booleans, might be able to remove the negate and the other conversion later on. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/107137 gcc/ChangeLog: * match.pd (`(nop_convert)-(convert)a`): New pattern. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/neg-cast-2.c: New test. * gcc.dg/tree-ssa/neg-cast-3.c: New test.
OK. jeff