From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A455F3858400; Tue, 21 Dec 2021 11:04:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A455F3858400 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/87548] Optimize fetch atomics with unused results Date: Tue, 21 Dec 2021 11:04:25 +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: 8.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WORKSFORME 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: Tue, 21 Dec 2021 11:04:25 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D87548 --- Comment #3 from Andrew Pinski --- .file "example.cpp" .intel_syntax noprefix .text .p2align 4,,15 .globl f(int*) .type f(int*), @function f(int*): .LFB0: .cfi_startproc lock and DWORD PTR [rdi], 10 ret .cfi_endproc .LFE0: .size f(int*), .-f(int*) .p2align 4,,15 .globl f1(int*) .type f1(int*), @function f1(int*): .LFB1: .cfi_startproc lock and DWORD PTR [rdi], 10 ret .cfi_endproc .LFE1: .size f1(int*), .-f1(int*) .p2align 4,,15 .globl f2(int*) .type f2(int*), @function f2(int*): .LFB2: .cfi_startproc lock xor DWORD PTR [rdi], 10 ret .cfi_endproc .LFE2: .size f2(int*), .-f2(int*) .p2align 4,,15 .globl f12(int*) .type f12(int*), @function f12(int*): .LFB3: .cfi_startproc lock xor DWORD PTR [rdi], 10 ret .cfi_endproc .LFE3: .size f12(int*), .-f12(int*) .ident "GCC: (GCC-Explorer-Build) 4.7.1" .section .note.GNU-stack,"",@progbits=