From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE4093858D28; Tue, 2 Apr 2024 13:46:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE4093858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712065618; bh=MsNzPLlzvV15nRn3Oy6nk51xve9lRh9X6OKz3NFFmpU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=T81iqpGxLlISg1Hm/DHPsoOoBQ3Ni2WKskzUyhb3xWzswYbSQ1Eh/Wtx94r4V2JPa 6Z0icmraIzT705eCJAthaXKeE5TlC1nXD59I8pcqGlHbOiZJ+dmgUzsH5EkB80J7oT 3LXxpbvDjPh3eTyT8wcf8ebngqmDvPbfMWr9/qwA= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/114552] [13/14 Regression] wrong code at -O1 and above on x86_64-linux-gnu since r13-990 Date: Tue, 02 Apr 2024 13:46:58 +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: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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=3D114552 --- Comment #4 from Jakub Jelinek --- The r13-989 to r13-990 difference is - movl k(%rip), %eax - movl %eax, (%rsp) - movzwl k+4(%rip), %eax - movw %ax, 4(%rsp) + movw $1, (%rsp) + movl $0, 2(%rsp) + movl $0, 8(%rsp) which clearly shows that previously it was copying just 6 bytes from k to %rsp+0, while now it directly sets those 6 bytes at %rsp+0 + another 4 bytes at %rs= p+8. The last insn is incorrect, shouldn't be there.=