From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AB11338582A1; Tue, 18 Jul 2023 10:37:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB11338582A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689676651; bh=HYRAMFRvbWe14mpXCSABJbfK31ervt6lV7JnGfkQsHc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LblpfXDTciip8lgRG76Fulh8wsNbrP4fMo/9Qm2BzzV7gP65F0HuZEdKLs5DpQaEZ 0V2TCRjal9k5SKIHOA2lotDhQ0fCfdJIkmlkVRd0sGmNZ4R1jI30bdrYRXX4yM9auX D4WUPrSgkn2FsV/8Vrvln5AHrbJJtYzUXARoEk4U= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110711] possible missed optimization for std::max with -march=znver2 Date: Tue, 18 Jul 2023 10:37:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: cc 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=3D110711 Hongtao.liu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crazylht at gmail dot com --- Comment #1 from Hongtao.liu --- You need to use -ffast-math, w/o it, operands order matters for floating po= int max/min, they're not commutative.=