From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4F9A5397282A; Tue, 29 Jun 2021 09:38:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F9A5397282A From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/101044] -ABS(A) produces two neg instructions Date: Tue, 29 Jun 2021 09:38:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ubizjak at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on everconfirmed assigned_to bug_status attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 09:38:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101044 Uro=C5=A1 Bizjak changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-06-29 Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |ubizjak at gmail do= t com Status|UNCONFIRMED |ASSIGNED --- Comment #2 from Uro=C5=A1 Bizjak --- Created attachment 51080 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D51080&action=3Dedit Proposed patch Patch introduces nabs patterns where we reverse the condition of the cmove. The compilation results in: movl %edi, %eax negl %eax cmovns %edi, %eax=