Hi GCC community, This patch will add the missed pattern described in bug 102232 [1] to the match.pd. Tree-optimization/96779: Adding new optimization to match.pd: * match.pd (-x == x) -> (x == 0): New optimization. * gcc.dg/tree-ssa/pr96779.c: testcase for this optimization. * gcc.dg/tree-ssa/pr96779-disabled.c: testcase for this optimization when -fwrapv passed. 1) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96779 Best wishes, Navid.