From patchwork Tue Oct 17 09:57:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lehua Ding X-Patchwork-Id: 154023 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4020870vqb; Tue, 17 Oct 2023 02:58:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+wbJ7WlkvbYEX0ncGewqQPCvFdfjg3ph6801TW1gGbj6zvbUtaRvY02srG5JKvuJNzw6R X-Received: by 2002:a05:622a:148d:b0:417:d340:c426 with SMTP id t13-20020a05622a148d00b00417d340c426mr2053963qtx.9.1697536700392; Tue, 17 Oct 2023 02:58:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697536700; cv=pass; d=google.com; s=arc-20160816; b=en2U/xw3MPiq64J3C7P7Ca3yM0y/PTqybVxiiWhagknCg8V0wXvQzYP9iYzYFQyeS6 DMEXPWc+H/h+fJn9gv1tR04X460vYPKP9pcmI7iGjGq5qVRjzX71GDTCSsTArFxJ+ApC BcWcCWWJBtaY8TGg3d/5Q7b8f4ENOt7GAtjG+iljDdLxpkwXVEiQeOKCMKRsZWUWbkmY gsl0sW4G5oVlvrKDRJAqjwFBUZH5ag2cN0dcAN9TcyZJY2wvDrK2XiKvm4d8T4d9OexM fjtCP28pQdhQnN7kuaStoAkTaJOMOTaTqFOAELVN8iFpPn0xsh2DHi0jnzrgBIxreHOq pnaA== ARC-Message-Signature: i=2; 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:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:arc-filter:dmarc-filter:delivered-to; bh=RCDGKji4NOgY0NYO8VzbRjeqBUtf95H9HczZqXOnxk8=; fh=x/Q0OlwHuvCZ3FpkiZPiUSvevOYVxUAi4aNnf76mUPQ=; b=bkAsFBzX2N3izjaHjBUFg6hV22jdvVe8FIyEavVlK+j5EL2RbXT4gAQXYMIshaZ178 FQyIO/C422kr3vekhS/5OYl3LE41M2e6Guh1cKbXyZQm3tuOM7LOmZRjnJeIA6+LLXqC L4r5opO6yqxRYierTCcO5mkRPGZ90savAX70+TqdRVELzucRdMukYC4RQOlwpp5136Gt rcldf96fRnBxq7am+Tkeg8c4/dg77HXApXFaPnU/scvYSTM38h2SUHauGY3yvk7I/NPB c6HUJVHjZ2o3QzhYuB03z3Yhky5m0h3Dp01VoKsbqKOkQ8TDCd5ywpVSTUhqmn5fHWHE PBCA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id h9-20020ac85849000000b004181b8ae8edsi861272qth.246.2023.10.17.02.58.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 02:58:20 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 2F8BA385840F for ; Tue, 17 Oct 2023 09:58:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbg153.qq.com (smtpbg153.qq.com [13.245.218.24]) by sourceware.org (Postfix) with ESMTPS id 94DA33858D38 for ; Tue, 17 Oct 2023 09:57:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 94DA33858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 94DA33858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=13.245.218.24 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697536672; cv=none; b=bKhVX6CWL7+QipVcH5HV9CGt4PSccv2a21MScD/q1Bjx27NCzaDz/9DHZ13diu/y/86HcqIk32cltNMfVa2QovyC1GWlcEL5kGoMvHP8RvXYbJlcJknP9Fqp6QB2LRlG6MiRgSrsPfUDnzPLJfq2NruFDpnofoWqB6bvwdAa390= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697536672; c=relaxed/simple; bh=Nwx8Ns7Ry36iEWx3pnknIrg18pvCJ41+qR1BqxjaqfY=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=kS//t/CKoaLE5OrB3LMVSmc8SMCgbG33TtBwLJ9FNoqv+0AAThFwXNqCYK2pM6grPFTT2dHAjZmDH/Cffn/Uyawc+Hi0pqbBO58rRF/lgUbCv4vVRpgcPrg2vN0zHghpdgOmvixmnic3LKAKeFgbw9gmCGDoS8bGqzZ8lwjA8dI= ARC-Authentication-Results: i=1; server2.sourceware.org X-QQ-mid: bizesmtp83t1697536661t8er9p3o Received: from rios-cad121.hadoop.rioslab.org ( [58.60.1.9]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 17 Oct 2023 17:57:38 +0800 (CST) X-QQ-SSF: 01400000000000C0F000000A0000000 X-QQ-FEAT: p+4tGrXQmSCFj7/h9L4TCofBrKtbYPkELxe+1/z05p1aOimo1YPCIEBgfBbh+ ADMLJCErxSqT+CO0OYakNCP2O0pRu152xtjZ0STCgeblN7z9h/o13knq4P8W3DrHr+mIeN7 7V4HvpYBaVtukc9RkhCfJVaGDIa3gd02hw8YPcoe7ZWDfHegF4SfIt/9VODau3gkmD3cF/+ /KZRcIOaolqLQLnOj/r07FAnkr66nOYAOKu2m1FF8RFZ+UyIPCc9OJE/Mnc2hx7zOYk8aa/ KcRMdW5Y+1tGFRmiYC41fP74RjkquNP3NC7BN6MdJOHzPrqaca9dPWBU2hPaNq7RrREbGDc DjN11TG33RnJy4mLAVFvnPQ6Jm8SIxrDUfFl0lpEfXhAn0KeAn4Fp7qfxat6Q== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 16060253989011011344 From: Lehua Ding To: gcc-patches@gcc.gnu.org Cc: juzhe.zhong@rivai.ai, kito.cheng@gmail.com, rdapp.gcc@gmail.com, palmer@rivosinc.com, jeffreyalaw@gmail.com, lehua.ding@rivai.ai Subject: [PATCH] RISC-V: Fix failed testcase when use -cmodel=medany Date: Tue, 17 Oct 2023 17:57:38 +0800 Message-Id: <20231017095738.1081807-1-lehua.ding@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz6a-0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, 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: 1779996242640715630 X-GMAIL-MSGID: 1779996242640715630 This little path fix a failed testcase when use -cmodel=medany. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/cpymem-1.c: Split check. --- gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-1.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) -- 2.36.3 diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-1.c b/gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-1.c index 9bb4904e8e9..549d6648104 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-1.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-1.c @@ -50,7 +50,7 @@ void f2 (__INT32_TYPE__* a, __INT32_TYPE__* b, int l) Use extern here so that we get a known alignment, lest DATA_ALIGNMENT force us to make the scan pattern accomodate code for different alignments depending on word size. -** f3: +** f3: { target { any-opts "-mcmodel=medlow" } } ** lui\s+[ta][0-7],%hi\(a_a\) ** lui\s+[ta][0-7],%hi\(a_b\) ** addi\s+a4,[ta][0-7],%lo\(a_b\) @@ -61,6 +61,16 @@ void f2 (__INT32_TYPE__* a, __INT32_TYPE__* b, int l) ** ret */ +/* +** f3: { target { any-opts "-mcmodel=medany" } } +** lla\s+[ta][0-7],a_b +** vsetivli\s+zero,16,e32,m4,ta,ma +** vle32.v\s+v\d+,0\([ta][0-7]\) +** lla\s+[ta][0-7],a_a +** vse32\.v\s+v\d+,0\([ta][0-7]\) +** ret +*/ + extern struct { __INT32_TYPE__ a[16]; } a_a, a_b; void f3 ()