From patchwork Wed Oct 4 22:55:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick O'Neill X-Patchwork-Id: 148641 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp450691vqb; Wed, 4 Oct 2023 15:56:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEQQ+Cu+DmWx+GDKn35kSNsfsz2VdlCpA36BHDr+s3BI29U0KPTFFE4i6gIkqifOMEqpu86 X-Received: by 2002:a17:906:31c9:b0:9b6:499a:172d with SMTP id f9-20020a17090631c900b009b6499a172dmr3539510ejf.52.1696460197726; Wed, 04 Oct 2023 15:56:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696460197; cv=none; d=google.com; s=arc-20160816; b=dhut/djjFP2SzQIyfceJ+zW+GazzdNLiozesGsDV5EXs+LNjTjIX/A6TCrL8suXfwR HWTq5nnHhkycORlti/57AySpTzh3D6YiVgMXUeoOAiwAJUs986LU5tfryArFCke94Fcb 3RYLkVkfrT9hncGHRSN/ZsXbWDMuQJ7G9XT3USTfigW39WkwCZBgjg+CXmWWFGTLbzHu R9RqmMXVpvCFx7o1JA4i3TUl6ffFeU4Boob5oeXzDdr4Ak6MngUIcz8Zj6w5yS//w666 tWi0tNkhgwqkEZQl0ylFECOAIhKi1bh8RDY3C2wLvssip7ukLwjJaYH6/sykpvs3CF9x DFzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dmarc-filter:delivered-to; bh=0gNOC/Fb8Ak+MyiNEl6XL1AUoRdrZGuOV6QCM0/orbo=; fh=sY91HWyeqmVE1FNZDiiVBdOZKs6oykyGSMqTyIAilMM=; b=D9RLSvpU/zTpxY1f+3E2T8DrpKoVyYlRm/XZLWe1Y2vw851VsdWDKxnhV9bzuQ7OUD yb1MDQSNVTjKmEz8E+Ty6bl22tPk5AoTvK24gS5TMZsXD0g56cLSKgmCrr9ynr7W5zpf K/a93okKzQzVaZ3LYLnbvPLWs3+eQpzVQrPIg2GDxV5FYftEf+toKgvIzoE04LJIXwHG 4Kaj8qFkGEl7OUNLu9SbvhtHgT1LdxYa7EugEB5BhKFbA6HEnB8eLXfAIK4oTz4rP6Uy ZPYeQD/Nnoka9NKczwVL/SwQYxXi0FDd9pIGvfy42lpbgbr8y0Pa0Ewxlo3DZIvqWk0y vmGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=cqEylNUU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id c11-20020a170906694b00b00993a68a3af5si73097ejs.529.2023.10.04.15.56.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 15:56:37 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=cqEylNUU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F2C1C3857706 for ; Wed, 4 Oct 2023 22:56:30 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id D07993858D3C for ; Wed, 4 Oct 2023 22:56:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D07993858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-517ab9a4a13so227685a12.1 for ; Wed, 04 Oct 2023 15:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1696460163; x=1697064963; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0gNOC/Fb8Ak+MyiNEl6XL1AUoRdrZGuOV6QCM0/orbo=; b=cqEylNUUDMpNJ3p9PgaCUKmLKLjTlm2SYGD3V1VpjFvqW206dPvUrsAr9d+9xUPqyd WKEkiEaGs3iOjyNgpyPhcb+y+YBUqx/u/awvd6WF39POT+DPhL1soXBC70iDeNOb70io qDffuiLNQGJ/EdhsoOOqtjxziypEDwB2Thb/t5TjTT89XNZ7YR0Te6DVPpNW0dbWn8DE YUPlwcXqMUmItGJTBmVNXzyK3pQ/ruKQx+FgZvNR61Ax9ACSbCuSxBoymUs67O02tNzN NT2r20ASQLnK+Um6mmo8TrD3n8l0uMYaz9bTNJs2pSVvkP+k7gjp1OLC6XFA0y12dCVD idKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696460163; x=1697064963; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0gNOC/Fb8Ak+MyiNEl6XL1AUoRdrZGuOV6QCM0/orbo=; b=RsWRuqhvIQAM/eeUniANi9483Ap7dtHydQSv9ffNx6YNsiTIHKYCQckyWHPJsx5BwZ BEmI8e3/DEHyKWUVUn4xJxEdbdXqsCY4nGby2t08BO3/bX5dlFyPyZzWqSohzyARuIgI Hjt1n7S9fFmfgzIdYmL1BL0sl2CHz5a39ZivcUsIryWdem8K4Bg46700LyDx2F5TUJIx Ldfv6hE66SPXvpR2CS87MR5rbAyatlQVxd3uHda5cOObBeFyUKWBLlNE3wsSvcwS2wf8 bDKklhsMNHeB/0A2gQj5aRhWci86JqSQZZKrgH84DpDT/Eg+oPE+p8iLDZx8pcb2/6k8 p8LA== X-Gm-Message-State: AOJu0Yw/hroZifNAr5ZOjpoRnJZWyb+ehydq3oMZip8zpdFSr1bbaWgF hLr6qBqcvqlhkt51+ztptIn2Aql0Fpjd/rVnQck= X-Received: by 2002:a05:6a20:a104:b0:161:2cf2:75ec with SMTP id q4-20020a056a20a10400b001612cf275ecmr4505262pzk.49.1696460163395; Wed, 04 Oct 2023 15:56:03 -0700 (PDT) Received: from patrick-ThinkPad-X1-Carbon-Gen-8.ba.rivosinc.com ([2601:647:5700:6860:5d01:b505:51d5:3b5e]) by smtp.gmail.com with ESMTPSA id z18-20020a170902ee1200b001c55e13bf2asm85474plb.283.2023.10.04.15.56.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 15:56:02 -0700 (PDT) From: Patrick O'Neill To: gcc-patches@gcc.gnu.org, JeffreyALaw@gmail.com Cc: joern.rennecke@embecosm.com, gnu-toolchain@rivosinc.com, Patrick O'Neill Subject: [PATCH v2] RISC-V: Test memcpy inlined on riscv_v Date: Wed, 4 Oct 2023 15:55:27 -0700 Message-Id: <20231004225527.930610-1-patrick@rivosinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778867448270032578 X-GMAIL-MSGID: 1778867448270032578 Since r14-4358-g9464e72bcc9 riscv_v targets use vector instructions to perform a memcpy. We no longer expect memcpy for riscv_v targets. gcc/testsuite/ChangeLog: * gcc.dg/pr90263.c: Skip riscv_v targets. * gcc.target/riscv/rvv/base/pr90263.c: New test. Signed-off-by: Patrick O'Neill Co-authored-by: Joern Rennecke --- Changes from v1: [PATCH] RISC-V: xfail gcc.dg/pr90263.c for riscv_v - Skip test rather than xfailing for riscv_v. - Add testcase to ensure memcpy is not emitted on riscv_v. --- gcc/testsuite/gcc.dg/pr90263.c | 1 + gcc/testsuite/gcc.target/riscv/rvv/base/pr90263.c | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/base/pr90263.c -- 2.34.1 diff --git a/gcc/testsuite/gcc.dg/pr90263.c b/gcc/testsuite/gcc.dg/pr90263.c index 3222a5331c1..831e098783b 100644 --- a/gcc/testsuite/gcc.dg/pr90263.c +++ b/gcc/testsuite/gcc.dg/pr90263.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-require-effective-target glibc } */ +/* { dg-skip-if "riscv_v uses an inline memcpy routine" { riscv_v } }*/ int *f (int *p, int *q, long n) { diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/pr90263.c b/gcc/testsuite/gcc.target/riscv/rvv/base/pr90263.c new file mode 100644 index 00000000000..7308428e2c3 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/pr90263.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-require-effective-target glibc } */ + +#include "../../../../gcc.dg/pr90263.c" + +/* { dg-final { scan-assembler-not "memcpy" { target { riscv_v } } } } */