From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F47E385694E; Thu, 5 Oct 2023 15:43:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F47E385694E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696520602; bh=S5Z0xpV4QRVeBzupSVPHhKCZfCjaxlTly3zAuzoBknI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gzYe5d5TkQ+kjaCcpfbAKZXAcBFl6eiRN/psl1xTsXedSpj0yi2TjceuTi79smbTv Eb96Lu1AwKnFj1DfPKt6WEIUlEaZJsv3tGUR/pJ+dcJPkeWKEUn75V4jdjWYMRW95f SMRqpM7/x/U/vnvsxb+oNGF25CMID7JNeIVsSNaM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111657] Memory copy with structure assignment from named address space should be improved Date: Thu, 05 Oct 2023 15:43:21 +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: 12.3.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ubizjak at gmail dot com 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=3D111657 --- Comment #6 from CVS Commits --- The master branch has been updated by Uros Bizjak : https://gcc.gnu.org/g:c6bff80d786919f2f64e8a9f3179d6d36888bdb3 commit r14-4418-gc6bff80d786919f2f64e8a9f3179d6d36888bdb3 Author: Uros Bizjak Date: Thu Oct 5 17:40:37 2023 +0200 i386: Improve memory copy from named address space [PR111657] The stringop strategy selection algorithm falls back to a libcall strat= egy when it exhausts its pool of available strategies. The memory area copy function (memcpy) is not availabe from the system library for non-defau= lt address spaces, so the compiler emits the most trivial byte-at-a-time copy loop instead. The compiler should instead emit an optimized copy loop as a fallback f= or non-default address spaces. PR target/111657 gcc/ChangeLog: * config/i386/i386-expand.cc (alg_usable_p): Reject libcall strategy for non-default address spaces. (decide_alg): Use loop strategy as a fallback strategy for non-default address spaces. gcc/testsuite/ChangeLog: * gcc.target/i386/pr111657.c: New test.=