From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 42B113858436; Mon, 10 Jul 2023 01:06:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42B113858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688951200; bh=U8PkkyvfTNdRvzRXyzKzdPqBD6ei7I9ovDFNKvk2uSs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cmGn1Nxm+kJJjoXPPGdAapuRSHalsSHJ//vTv/8sLmcpG2xoJ3fu/yl+GHVp7z2Vv rtYVHvdeWmwSMHKjIVGPoclpoB4gVMhF4SsVr5NAkbTOrsWJm0SMOwbm5E1A+dRrtN rU6YDk6L2bUvj/tF5wOs9foi8SCesmxORhOIgUv0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110170] Sub-optimal conditional jumps in conditional-swap with floating point Date: Mon, 10 Jul 2023 01:06:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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=3D110170 --- Comment #12 from CVS Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:d41a57c46df6f8f7dae0c0a8b349e734806a837b commit r14-2403-gd41a57c46df6f8f7dae0c0a8b349e734806a837b Author: liuhongt Date: Mon Jul 3 18:19:19 2023 +0800 Add pre_reload splitter to detect fp min/max pattern. We have ix86_expand_sse_fp_minmax to detect min/max sematics, but it requires rtx_equal_p for cmp_op0/cmp_op1 and if_true/if_false, for the testcase in the PR, there's an extra move from cmp_op0 to if_true, and it failed ix86_expand_sse_fp_minmax. This patch adds pre_reload splitter to detect the min/max pattern. Operands order in MINSS matters for signed zero and NANs, since the instruction always returns second operand when any operand is NAN or both operands are zero. gcc/ChangeLog: PR target/110170 * config/i386/i386.md (*ieee_max3_1): New pre_reload splitter to detect fp max pattern. (*ieee_min3_1): Ditto, but for fp min pattern. gcc/testsuite/ChangeLog: * g++.target/i386/pr110170.C: New test. * gcc.target/i386/pr110170.c: New test.=