From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C085E3858D34; Tue, 11 Jun 2024 05:27:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C085E3858D34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718083669; bh=Z/po9u4gEMBSTmp3sgSCUf5uV07KBLFlzhoJMn7EHBU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=x0+gQam/BYhzPGzqeh9UmzwX1L8/v68UPdyNx5+5cvwbcX9gdvp3WQfz5YDHnWBIh i5p1h4zJ4x6hoxTNpC6X14MHCQG/QlE42+zZNGdqfXbEeLc7mQ7vPCnQauTdHxR1P6 p57UdkSOCU84tP8gC3wKMU0M3osKj4Jfu1bnzTP0= From: "liuhongt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115418] Extra movapd emitted for MAX implementation Date: Tue, 11 Jun 2024 05:27:49 +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: unknown X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: liuhongt 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: 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=3D115418 Hongtao Liu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liuhongt at gcc dot gnu.org --- Comment #3 from Hongtao Liu --- (In reply to Andrew Pinski from comment #2) > Note the issue is ix86_expand_sse_fp_minmax only handles LT/UNGE but it > should handle GT/UNLT with both parts swapped (comparison and true/false). >=20 GT/UNLT is "canonicalized" to GT/UNGT in ix86_prepare_sse_fp_compare_args 4410 case GE: 4411 case GT: 4412 case UNLE: 4413 case UNLT: 4414 /* These are not supported directly before AVX, and furthermore 4415 ix86_expand_sse_fp_minmax only optimizes LT/UNGE. Swap the 4416 comparison operands to transform into something that is 4417 supported. */ 4418 std::swap (*pop0, *pop1); 4419 code =3D swap_condition (code);=