From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9578F385841B; Thu, 23 Nov 2023 08:39:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9578F385841B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700728774; bh=i+Q1S9Y1ir5F15dV22E4KByFU/qZJtABYEArnnAD18w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Cd4WMt7oza2VXyE7wgGELCPFgz6WsrCZRVavkswWES5MzPlZh72duPcFBQp5NI3O2 aMZvS9UHUZ71KkBAi88X1m7Y0QCf67oOF/OnhjEpii8B3zLt6AvrxP813EecM4E1Z1 PZZQnUEO/aQ+74XPBuyWFbVopRX1wGDgozcUlaG0= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/32667] block copy with exact overlap is expanded as memcpy Date: Thu, 23 Nov 2023 08:39:30 +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: 4.2.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: 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=3D32667 --- Comment #35 from Jakub Jelinek --- Note, clang makes the same assumption apparently (while MSVC emits rep movs inline and ICC either that, or calls _intel_fast_memcpy). As I mentioned earlier, if glibc and other libraries provide an alias to memcpy or memmove (whichever guarantees that exact overlap will be handled right in the implementation),= GCC could start using that instead of memcpy for those cases. And it would be = up to the libraries to decide which implementation satisfies that.=