From patchwork Mon May 8 14:38:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 91186 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2206659vqo; Mon, 8 May 2023 07:39:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Z6TlAL/9egz9xl/kJjHAj0F6ZvfMC70Zmz6xd1c8l/EPamRq4hdXLJMirHGBsahZ75A+k X-Received: by 2002:a17:907:e8f:b0:94e:e082:15b9 with SMTP id ho15-20020a1709070e8f00b0094ee08215b9mr10120481ejc.77.1683556772974; Mon, 08 May 2023 07:39:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683556772; cv=none; d=google.com; s=arc-20160816; b=oRNgVCKf7PbW21Hy43WM3/4BsIT0GSmaNDVc0ojcZptpcYYFzhtQTCHX4iBeGhsJZi LZXdLKqFCN9+D74I/UD72XB/KLqh0npZhULV+oEsECaN9aVBBw2gGK3t3S00tqRINlia 9qKT9qFhCfr6aXY3KvCTpEjG9Unwck8RYqSBzUi/sEdss5QBV8nUPDcfB+rY3RvJTrXi OY0DmZzRyP15scAZuulZDyJSFoKvFC+A1FIoMacqI0Pe/9HY7V8GyfG+YeX4ufVVp5p4 k42tJxV/1w/PjasxPub58xDwCKlcpRLXgDLoJhBVyErliox+gitseyPd7AVBBBWE/Hc1 Nt4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=8lQQVUIJoQtQizDC5rERxl78HkNd2XqVtqyFR/Axyd4=; b=PUGGPBdTA5mtIfDLwr1SEwZNOg/XbDheY6wqBa+FgsXbbBCSZpZ6hQZsyqUKYayhiw Gt08iK/Nr5C1RzQKRia8D//59wi8lzdKVEW3Nug+zAZ60sG3QxAcoqHNMB1BN6OR+8mi MMapE5EmLPe71VfnXO6sISNVrkZENoCcqSyj0jpUzrJWd2V0h6Igmb4AzuUAXn6Z3yAe /MdXbm1YEfZIdEXHRdlMd1HP2VEP4AOJtu2q5sDPoVFUtNaz0cxQqnKEjX55w77ZLPHP 63Hf6zY9EIq0sl3l85hUjyrNPUeUHLr4eMbPHj4KZ6javIwsSa2UQZnGbldFNED/Y/+G f18Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=hKJ6wcTu; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id rf14-20020a1709076a0e00b0094f2c23fcaasi114204ejc.0.2023.05.08.07.39.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 07:39:32 -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=@gcc.gnu.org header.s=default header.b=hKJ6wcTu; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5D72C385558C for ; Mon, 8 May 2023 14:39:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D72C385558C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683556757; bh=8lQQVUIJoQtQizDC5rERxl78HkNd2XqVtqyFR/Axyd4=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=hKJ6wcTuUH3A16C+Mh5LL8GnbpMiSqSK9ah5PpXgy+jHuzcDjCHp3pRX+ndy1sWB8 8XbniWo5jnJE4T1ENPK6vB9mB/k0PseTl+757vFlXA1ePp5QtJtfSA/FujufDWI0Fm b86BeLdaRaih+PjWmoBP4cgB8loaDrq3ocKdi3yQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 3A7703858C53 for ; Mon, 8 May 2023 14:38:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3A7703858C53 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-64384274895so3217281b3a.2 for ; Mon, 08 May 2023 07:38:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683556713; x=1686148713; 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=8lQQVUIJoQtQizDC5rERxl78HkNd2XqVtqyFR/Axyd4=; b=iAMsTtJy8B9dMDSFgGtxR5aiJ/5uhcso7yAUsj+yMowPvJL6k+3GRa55b949XCfGAe +8u3BNhLaI/kJwrxIh4u9TvrFH9Ay+XR7XbXNADn9AMxcJKSWOa4dItVFMfESrX0rRrJ VkXaFpB2q/0ZxbMPSUeV6eUdve9V3lTf0H/n4Vt3746u3fJRSf5mEWDJfMfAx27g/huY wPWQsJ2QACRdL/4HqbPUM+2iPcL9S0Fl5rNyxrbuu61mmpRZV2aGJ8ZCYt5z1yrt9aBT 86+hgpII4G6JgOfIrbjQxvNjD5nYp54u4LXY984IP9xrvdlEEsduDDaoxPUI9iLuHjrv jRAg== X-Gm-Message-State: AC+VfDwFf1EQGe/C3xqfzDijUIRQ7nhW4wUK1lAmsSjqXwplz4xNN1g6 gv1s1fjKy2oR/OX5XfJ8ntY+fHaqpjsP18dHGYm7kU5UtK5C060IZyy6MMBAGuoPdist80u8KBU S3LH0fxbNlZzTgx9Fl6O5U/vu/TXmpZDt4vdNTh7RRNHyRRB+gNZjFL54pe6gZBDurB7AEIVpNw iF4IU= X-Received: by 2002:a05:6a00:c87:b0:63d:23a7:ca62 with SMTP id a7-20020a056a000c8700b0063d23a7ca62mr14951008pfv.19.1683556712807; Mon, 08 May 2023 07:38:32 -0700 (PDT) Received: from hsinchu02.internal.sifive.com (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id x11-20020a056a00270b00b00636c4bd7c8bsm60506pfv.43.2023.05.08.07.38.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 07:38:32 -0700 (PDT) To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com Cc: Kito Cheng Subject: [committed] RISC-V: Improve portability of testcases Date: Mon, 8 May 2023 22:38:29 +0800 Message-Id: <20230508143829.45127-1-kito.cheng@sifive.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Kito Cheng via Gcc-patches From: Kito Cheng Reply-To: Kito Cheng Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765337226734485191?= X-GMAIL-MSGID: =?utf-8?q?1765337226734485191?= stdint.h will require having corresponding multi-lib existing, so using stdint-gcc.h instead, also added a riscv_vector.h wrapper to gcc.target/riscv/rvv/autovec/. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.h: Change stdint.h to stdint-gcc.h. * gcc.target/riscv/rvv/autovec/template-1.h: Ditto. * gcc.target/riscv/rvv/autovec/riscv_vector.h: New. --- .../riscv/rvv/autovec/partial/single_rgroup-1.h | 2 +- .../gcc.target/riscv/rvv/autovec/riscv_vector.h | 11 +++++++++++ .../gcc.target/riscv/rvv/autovec/template-1.h | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/riscv_vector.h diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.h index be6b4c641cbb..f64799d4e2a9 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.h +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.h @@ -1,5 +1,5 @@ #include -#include +#include #define N 777 diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/riscv_vector.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/riscv_vector.h new file mode 100644 index 000000000000..fbb4858fc867 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/riscv_vector.h @@ -0,0 +1,11 @@ +/* Wrapper of riscv_vector.h, prevent riscv_vector.h including stdint.h from + C library, that might cause problem on testing RV32 related testcase when + we disable multilib. */ +#ifndef _RISCV_VECTOR_WRAP_H + +#define _GCC_WRAP_STDINT_H +#include "stdint-gcc.h" +#include_next +#define _RISCV_VECTOR_WRAP_H + +#endif diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/template-1.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/template-1.h index 799e2d7d7542..074952f21d5f 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/template-1.h +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/template-1.h @@ -1,5 +1,5 @@ #include -#include +#include void foo0 (int8_t *__restrict f, int16_t *__restrict d, int n)