https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103245
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>: https://gcc.gnu.org/g:3200de91bc70bfd6d4b7b40e769bc82756b9b555 commit r12-5291-g3200de91bc70bfd6d4b7b40e769bc82756b9b555 Author: Andrew Pinski <apin...@marvell.com> Date: Mon Nov 15 22:55:09 2021 +0000 tree-optimization: [PR103245] Improve detection of abs pattern using multiplication So while working on PR 103228 (and a few others), I noticed the testcase for PR 94785 was failing. The problem is that the nop_convert moved from being inside the IOR to be outside of it. I also noticed the patch for PR 103228 was not needed to reproduce the issue either. This patch combines the two patterns together for the abs match when using multiplication and adds a few places where nop_convert are optional. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/103245 gcc/ChangeLog: * match.pd: Combine the abs pattern matching using multiplication. Adding optional nop_convert too. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr103245-1.c: New test.