From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3AFEB3856967; Thu, 25 Aug 2022 22:20:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3AFEB3856967 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661466011; bh=9+Px1jwJSr1dA0m/2F2Vj2HNcO9n0zZ+Yb0NGIVPZrU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=W+6SK/BOcYEEiQdsYHXQ/iDUKOOwxsfM3e9jesOL7C5g/PV6ucteimjSpYEEWDlk+ 8BPIchFxkgqkWdJRaB3JHH6aouJt7GrhfK0mcFoi76nvptBZKHeZukECmkoHZ7PLZm ZjxPqkLiDSaafTawkY1HUCTBhNuoztBRM+MP3V0A= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94920] Failure to optimize abs pattern from arithmetic with selected operands based on comparisons with 0 Date: Thu, 25 Aug 2022 22:20:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94920 --- Comment #7 from Andrew Pinski --- (In reply to Andrew Pinski from comment #6) > (In reply to Paul Hua from comment #5) > >=20 > > Yes, we should do. This also fails the ABS_EXPR scan-tree-dump on Loong= Arch. >=20 > And on riscv32. I will look into that failure later this week. I am suspecting it is because for both LoongArch and RISCV, logical-op-non-short-circuit defualts to 0. I am going to debug it right no= w.=