From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F08B0385DC12; Mon, 20 Apr 2020 07:24:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F08B0385DC12 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587367490; bh=13iyyQaXd9+b7Djok71qV44KPIdSxwdfkBhkg2epsPE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bevLrZ0fQ/dX2iAKpwigt1wsTOLHFhMliSnqRQivfdqJ6YA0eTrRmERxpkSjTQdzG r5Awj/qGwlNai6uD+Ia2s581VqIIpRfAXZ758XH8wuYcUZqzXjlaatL15pw4L8i6zu 3zb9UlrRWB9a0rSLEm/rwbgJepBdc4Vj1yb+3GcQ= From: "z.zhanghaijian at huawei dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/94665] missed minmax optimization opportunity for if/else structure. Date: Mon, 20 Apr 2020 07:24:50 +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: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: z.zhanghaijian at huawei dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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 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: Mon, 20 Apr 2020 07:24:51 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94665 --- Comment #4 from z.zhanghaijian at huawei dot com --- (In reply to Segher Boessenkool from comment #2) > If vara is a NaN, this is not the same; it needs -ffinite-math-only. > And in fact adding that option does the trick (on powerpc that is, I > don't have an aarch64 Fortran handy). >=20 > Could you check this please? Yes, on aarch64, fmaxnm can be generated with -ffinite-math-only and -funsafe-math-optimizations. One question: why is it OK for rtl combine to generate the fminnm here? Anything I missed?=