From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6BAB13858CDB; Mon, 10 Jun 2024 17:06:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BAB13858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718039219; bh=/PK4JD390Yn9eT4fs8hrv0LC+jAo+ZVsEzUySHS0pW4=; h=From:To:Subject:Date:From; b=f6/H4d5bHJKDIsAITP6aUiVecA+uZAJz65E/EOVUWN0oISsZX8VRBYKGXqpVmeT2Q Kr6INQEBQNv+2QPkW19HTqmhMZUZZDt16Jsi/ZUw4YG7QqOpcr7TlfRweWMvwrV38C SlOsZjzo7PeqZJcRjAu1aD4eEAzLnObVcqwSFHIk= From: "sjames at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115418] New: [14 regression] Extra movapd emitted for MAX implementation Date: Mon, 10 Jun 2024 17:06:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sjames at gcc dot gnu.org 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 115418 Summary: [14 regression] Extra movapd emitted for MAX implementation Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- ``` #define MAX(a, b) ((a) < (b) ? (b) : (a)) #define MAX3(a, b, c) MAX((a), MAX((b), (c))) double f(double a, double b, double c) { return MAX3(a,b,c); } ``` ``` $ gcc-14 /tmp/foo200.c -S -o - -O2 .file "foo200.c" .text .p2align 4 .globl f .type f, @function f: .LFB0: .cfi_startproc movapd %xmm2, %xmm3 maxsd %xmm1, %xmm3 maxsd %xmm0, %xmm3 movapd %xmm3, %xmm0 ret .cfi_endproc .LFE0: .size f, .-f .ident "GCC: (Gentoo Hardened 14.1.1_p20240608 p2) 14.1.1 20240608" .section .note.GNU-stack,"",@progbits ``` I only see the extra movapd with 14.=