From patchwork Mon Sep 18 12:13:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lehua Ding X-Patchwork-Id: 141393 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp2609091vqi; Mon, 18 Sep 2023 05:14:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDPuerPzxsFKK7NTCt/b9/5HZKUAz1IKEWrsZt8t+6ks2c3bzIjxKRmzNXH+Bh1nfUVEc2 X-Received: by 2002:a05:6512:70e:b0:4f9:5426:6622 with SMTP id b14-20020a056512070e00b004f954266622mr6808307lfs.69.1695039285662; Mon, 18 Sep 2023 05:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695039285; cv=none; d=google.com; s=arc-20160816; b=sXHt5740d2X5cup97f3I4x4iEona9cMhCoNMI2X1Wkcyf4yJ6srqjIga2HUPhTdlJH +Kv6OWfFTWYYUAtPqKjH5srOwdGjpodt9HNwIZjIHp3bNC/WQoNnKr9lsfyNKijOsH00 AbAYKQjLCBmQgJVT01rq+ozBE/a3RY6GWKpL3KUlsE61LaEWyWFSvp2VHr+/b7HjsXV6 PUl74J+biBSKKoXByM3+m/69MdohUVcWW0DpuvwN9ApY5h5MyRfarFd0T+aa4abKoITR /km2EEM+k5mX/L9kuMVyMNVH8IimkjpiUp+Qtc7EMrQzbcD/d4PjOBKipoMJXErEIIt7 G0Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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:dmarc-filter:delivered-to; bh=h9xVQeWx3hffyb0WSkCAzACN2ckWt5d4NIxnOHjgYZM=; fh=x/Q0OlwHuvCZ3FpkiZPiUSvevOYVxUAi4aNnf76mUPQ=; b=IW3yI80BIt3ypVh26cqrK6Ws10cUvZVwoTHXqBV4uRI/SLb0/0dUUB8WMqWUgjwMTt n9Y1ExsOGiYqwXwwGuIIvm7AaTSWsB+jKHE/H2f10hTsZ1XdWy1dB2XdcF+T1axkmJQM MNG5/qiJXE3bICY4xPaM+JhJmBOGcTavU+vLJ+t9lJ4YcrhSfWt5XWVuov7pMY4g7npj AlGpaT+PZ5T76mubzNggGcu+9nPmCXq3G6NswcGXDl9UAHsnaQiFkfLTGdGm5SsboaoL lUlMBJoxkcwpLJvIHsNddEikWyJLeCu9B2hAPLugG10QqGhgO+u5a2Uqa6x/1M5n4ETa 9HfQ== ARC-Authentication-Results: i=1; mx.google.com; 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 b24-20020a05640202d800b0052ed5cdceebsi8161893edx.206.2023.09.18.05.14.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 05:14:45 -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; 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 B3906385CC87 for ; Mon, 18 Sep 2023 12:14:00 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbgau1.qq.com (smtpbgau1.qq.com [54.206.16.166]) by sourceware.org (Postfix) with ESMTPS id 5C5BE385558F for ; Mon, 18 Sep 2023 12:13:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C5BE385558F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp68t1695039206t230zq2o Received: from rios-cad121.hadoop.rioslab.org ( [58.60.1.9]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 18 Sep 2023 20:13:24 +0800 (CST) X-QQ-SSF: 01400000000000C0F000000A0000000 X-QQ-FEAT: W+onFc5Tw4O3nkVOi6283LoYMe7bIuQJjOLquUJcZJ63WwsG5o40GOA4M3uju J8eOeo4YDiZJsHvBkN3rhwny1Hzx1JNrjUv3h8lReu30IdHmBkUm3i8/OBheDfEtnnCCx5h hBqrMXZIGd4OeH0neHm8C51XyG3KlxKWCoH/VtudObgi31Apjw4Na03iogV67mivDpQcbR7 weXZbZXb1ji+sLhjSrh4IYzhgS3+qmQf1qf7JhO6TAbnxYxYcCbn4oskZ2Rm+tnuRxYM7Cx ZvZwIvCFt4AJSCotgFfI1p3cuB87Q6coItvSHsX5Z+O89ENXEDnntBtl+EAQuoCXXGGiUQc OED7EzOZXTGo3N5pFv2pGX1dwdqoILE9G2MEAwc/jqdPYdW+heWanojvc/35Ck4C90CD/KC FJZs/TocNA4= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 13616599831885567444 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: Add fixed PR111255 testcase by other patch Date: Mon, 18 Sep 2023 20:13:24 +0800 Message-Id: <20230918121324.3696866-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.4 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 Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777377513807720292 X-GMAIL-MSGID: 1777377513807720292 This patch add the missed PR111255 testcase which is fixed by this committed patch (https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628922.html). PR target/111255 gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/vsetvl/pr111255.c: New test. --- .../gcc.target/riscv/rvv/vsetvl/pr111255.c | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr111255.c -- 2.36.3 diff --git a/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr111255.c b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr111255.c new file mode 100644 index 00000000000..736f6838a50 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr111255.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 --param riscv-autovec-lmul=m2 -fno-vect-cost-model" } */ + +#include + +#define DEF_LOOP(OLD_TYPE, NEW_TYPE) \ + void __attribute__ ((noipa)) \ + test_##OLD_TYPE##_2_##NEW_TYPE (NEW_TYPE *__restrict r, \ + OLD_TYPE *__restrict a, NEW_TYPE b, \ + OLD_TYPE *__restrict pred, int n) \ + { \ + for (int i = 0; i < n; ++i) \ + { \ + r[i] = pred[i] ? (NEW_TYPE) a[i] : b; \ + } \ + } + +/* INT -> narrower-INT */ +#define TEST_ALL_X2X_NARROWER(T) \ + T (int16_t, int8_t) + +TEST_ALL_X2X_NARROWER (DEF_LOOP) + +/* { dg-final { scan-assembler-not {\tvsetvli\t[a-x0-9]+,[a-x0-9]+,e[0-9]+,m[f0-9]+,t[au],m[au]\n\tvsetvli\t} } } */