Message ID | 20231022224643.1445215-1-juzhe.zhong@rivai.ai |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp972423vqx; Sun, 22 Oct 2023 15:47:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJS8l25XyyzdrWok0hp2OXg21zWubpmQ5jG4gA6Ab3CmXy63y5SInycc/dFZgzVdPdqzPS X-Received: by 2002:ac8:5f52:0:b0:41c:d8a3:21b6 with SMTP id y18-20020ac85f52000000b0041cd8a321b6mr10286551qta.35.1698014838608; Sun, 22 Oct 2023 15:47:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698014838; cv=pass; d=google.com; s=arc-20160816; b=QUKrTPvM/LrjZlqhgQf3zXpfz/nSdwUl7ZbcUBELQc1t+atkkK+TgRfjrw1dxip3jZ AKX3RgU5J6SMp1OVHMapYVdbNKy+BhXUyGt/o9MZSu5J8tCf60HpzSNE/vKtRbynUvqA hZziU63Tk6b7/IWvrKPNQ2xXX7v8Zv3bGqxkFdO8T+mI3u+MwaPvFkW1G2iakgqJMFkF 8E2+ATwSsMFF/T9fly5OGLSiLXVRV5dBTyiP7XZr8VVNp0vlmLviDjDwLZe2bwSrz4zP 3ihaAhgwRTipryHghPZEObACRFm9HcsbJ55B0TVk6PwVLCookNykFVUZKRgZZz9r2OKi NOeA== 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=MpyXOvJ+Lu33KPfDMjMGkbi5C+b4KHEWLVTjuqGXmnQ=; fh=12MRPJmZ1mgDpHqWoogMKqnaGRGM2b7lcuJroqfjJiw=; b=QeOXOQSU30iUacXvBV12xwfIAzPQq9tpMtVF8q3CoGn61aWOD02oOm2FSEb1SOCZLg GPpRctyU9+gQ/Jz6lfDmqBza8+dB2PE8CoqEdViN3NHa4baFkbiNYKII12TennIs/9Na EFhjyu7JSDRnsaYKEL+H03VAwC+bz8orklmmagBpXQfOhFLEFnToH8lXwhvofFCT/Vlk EzCk/MioTtTKqu+dJIHx78QkuSwEgHgwwT1ZKM2h66kR5FN/c+m5lTz3t33p4uI7pDhB qY/dZdbZo9322a/I6PHbYXclg6uRv53zwur9CgB7YDqENcGjoPOIxNUzPP/ilv756qrZ 3ifw== 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 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 e17-20020ac85dd1000000b0041908a417a4si4755279qtx.33.2023.10.22.15.47.18 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 15:47:18 -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; arc=pass (i=1); 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 608DC3858C2F for <ouuuleilei@gmail.com>; Sun, 22 Oct 2023 22:47:18 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbgjp3.qq.com (smtpbgjp3.qq.com [54.92.39.34]) by sourceware.org (Postfix) with ESMTPS id 7DE703858D37 for <gcc-patches@gcc.gnu.org>; Sun, 22 Oct 2023 22:46:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7DE703858D37 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 7DE703858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=54.92.39.34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698014815; cv=none; b=ArbRoYwaqJCNGZaTL1jcEUxYocUXDC2sQ9lUT2MmMQMO/Jyvx4d+f9Qongxbh6g1+h1QSkNPstWumRzZWDDnmI68nRmpeLd20gd2OOV4p+rUy7EGY9pk3fEwk5jZQXMeEz5FJc1Q1Yg9UrX46cDnE502GJGUHuv1gi94pZpg2wQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698014815; c=relaxed/simple; bh=dvpTq0f/YVnQJpPtuTiduv1mZilRlS0tkABMvFQxkgI=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=pvqk43IwlZhrfyIJjxytxZwUBt94MSHxWJUt76ai38vgtk98DfMWYqqhpPSABx5O27YtzBS12PLIQI7kTa3B2y5oK291Ot+hOIPwkIQmj4XnrbxpAQsRlDEMZ/1NjMZl4M7IIHMyMD9tol4ZYAHRLEtbrC3G0Az+DKg+u4z7G00= ARC-Authentication-Results: i=1; server2.sourceware.org X-QQ-mid: bizesmtp89t1698014805te9fsshh Received: from rios-cad121.hadoop.rioslab.org ( [58.60.1.9]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 23 Oct 2023 06:46:44 +0800 (CST) X-QQ-SSF: 01400000002000G0V000B00A0000000 X-QQ-FEAT: hoArX50alxH5q7rcbsmFpu3LnYOFGsRzFKOkiOwHQ4fcnvnzqs/S4nXQTEwb1 bg5Ib028n/fYjnxz3jjBl8tvZ4sZzVFZ4Zx5dJKR7y3U4RvgzdC8cixuuBmPEhCe3/cG68n BlTmtIWCStjs9LW5co4aFvlPKlB5g35sKUcby8+Sj+OP1yq3O2kycErLGi/ePKUKnQ5jd5D +MrwDBaF3y6LH8TvUTjbTP3Yposu2DrzvT+HN9AOH0DM5tzZredX4KhBlzsgRRIYABzaRqI WJnQlicgrKyapMe+Gw6GqwKWm8TnKvMmgY2sLxml1sep1CoaOqLFZNMoiWU+1VIEKmhf5PH yfXuXn/Mf1CZc0F0p8ne22n6maWWhKIRHoWJygPDU+Lox6oFFw= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 9545360956223254026 From: Juzhe-Zhong <juzhe.zhong@rivai.ai> To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, kito.cheng@sifive.com, jeffreyalaw@gmail.com, rdapp.gcc@gmail.com, Juzhe-Zhong <juzhe.zhong@rivai.ai> Subject: [PATCH] RISC-V: Fix AVL_TYPE attribute of tuple mode mov<mode> Date: Mon, 23 Oct 2023 06:46:43 +0800 Message-Id: <20231022224643.1445215-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz7a-one-0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780497607561032992 X-GMAIL-MSGID: 1780497607561032992 |
Series |
RISC-V: Fix AVL_TYPE attribute of tuple mode mov<mode>
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
juzhe.zhong@rivai.ai
Oct. 22, 2023, 10:46 p.m. UTC
The tuple mode mov<mode> pattern doesn't have avl_type so it is invalid attribute. gcc/ChangeLog: * config/riscv/vector.md: Fix avl_type attribute of tuple mov<mode>. --- gcc/config/riscv/vector.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On 10/22/23 16:46, Juzhe-Zhong wrote: > The tuple mode mov<mode> pattern doesn't have avl_type so it is invalid attribute. > > gcc/ChangeLog: > > * config/riscv/vector.md: Fix avl_type attribute of tuple mov<mode>. Presumably you got a fault or something similar trying to compute the avl_type attr when trying to access operands[7]? from this code: > (eq_attr "type" "vlde,vldff,vste,vimov,vimov,vimov,vfmov,vext,vimerge,\ > vfsqrt,vfrecp,vfmerge,vfcvtitof,vfcvtftoi,vfwcvtitof,\ > vfwcvtftoi,vfwcvtftof,vfncvtitof,vfncvtftoi,vfncvtftof,\ > vfclass,vired,viwred,vfredu,vfredo,vfwredu,vfwredo,\ > vimovxv,vfmovfv,vlsegde,vlsegdff") > (symbol_ref "INTVAL (operands[7])") > (eq_attr "type" "vldm,vstm,vimov,vmalu,vmalu") OK for the trunk. Jeff
Committed, thanks Jeff. Pan -----Original Message----- From: Jeff Law <jeffreyalaw@gmail.com> Sent: Monday, October 23, 2023 10:24 AM To: Juzhe-Zhong <juzhe.zhong@rivai.ai>; gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com; kito.cheng@sifive.com; rdapp.gcc@gmail.com Subject: Re: [PATCH] RISC-V: Fix AVL_TYPE attribute of tuple mode mov<mode> On 10/22/23 16:46, Juzhe-Zhong wrote: > The tuple mode mov<mode> pattern doesn't have avl_type so it is invalid attribute. > > gcc/ChangeLog: > > * config/riscv/vector.md: Fix avl_type attribute of tuple mov<mode>. Presumably you got a fault or something similar trying to compute the avl_type attr when trying to access operands[7]? from this code: > (eq_attr "type" "vlde,vldff,vste,vimov,vimov,vimov,vfmov,vext,vimerge,\ > vfsqrt,vfrecp,vfmerge,vfcvtitof,vfcvtftoi,vfwcvtitof,\ > vfwcvtftoi,vfwcvtftof,vfncvtitof,vfncvtftoi,vfncvtftof,\ > vfclass,vired,viwred,vfredu,vfredo,vfwredu,vfwredo,\ > vimovxv,vfmovfv,vlsegde,vlsegdff") > (symbol_ref "INTVAL (operands[7])") > (eq_attr "type" "vldm,vstm,vimov,vmalu,vmalu") OK for the trunk. Jeff
Hi, Jeff. (define_insn_and_split "*mov<VT:mode>_<P:mode>" [(set (match_operand:VT 0 "reg_or_mem_operand" "=vr,vr, m") (match_operand:VT 1 "reg_or_mem_operand" " vr, m,vr")) (clobber (match_scratch:P 2 "=X,&r,&r")) (clobber (match_scratch:P 3 "=X,&r,&r")) (clobber (match_scratch:P 4 "=X,&r,&r"))] "TARGET_VECTOR" "#" "&& reload_completed" [(const_int 0)] { riscv_vector::expand_tuple_move (operands); DONE; } [(set_attr "type" "vmov,vlde,vste") (set_attr "mode" "<VT:MODE>") (set (attr "avl_type") (const_int INVALID_ATTRIBUTE))]) We classify this pattern as vlde/vste/vmov, this pattern doesn't have AVL TYPE operands. I realize that when I am adding new pre-RA optimization PASS it caused issue. juzhe.zhong@rivai.ai From: Jeff Law Date: 2023-10-23 10:24 To: Juzhe-Zhong; gcc-patches CC: kito.cheng; kito.cheng; rdapp.gcc Subject: Re: [PATCH] RISC-V: Fix AVL_TYPE attribute of tuple mode mov<mode> On 10/22/23 16:46, Juzhe-Zhong wrote: > The tuple mode mov<mode> pattern doesn't have avl_type so it is invalid attribute. > > gcc/ChangeLog: > > * config/riscv/vector.md: Fix avl_type attribute of tuple mov<mode>. Presumably you got a fault or something similar trying to compute the avl_type attr when trying to access operands[7]? from this code: > (eq_attr "type" "vlde,vldff,vste,vimov,vimov,vimov,vfmov,vext,vimerge,\ > vfsqrt,vfrecp,vfmerge,vfcvtitof,vfcvtftoi,vfwcvtitof,\ > vfwcvtftoi,vfwcvtftof,vfncvtitof,vfncvtftoi,vfncvtftof,\ > vfclass,vired,viwred,vfredu,vfredo,vfwredu,vfwredo,\ > vimovxv,vfmovfv,vlsegde,vlsegdff") > (symbol_ref "INTVAL (operands[7])") > (eq_attr "type" "vldm,vstm,vimov,vmalu,vmalu") OK for the trunk. Jeff
diff --git a/gcc/config/riscv/vector.md b/gcc/config/riscv/vector.md index 32955fb8cf0..ef91950178f 100644 --- a/gcc/config/riscv/vector.md +++ b/gcc/config/riscv/vector.md @@ -1208,7 +1208,8 @@ DONE; } [(set_attr "type" "vmov,vlde,vste") - (set_attr "mode" "<VT:MODE>")]) + (set_attr "mode" "<VT:MODE>") + (set (attr "avl_type") (const_int INVALID_ATTRIBUTE))]) ;; ----------------------------------------------------------------- ;; ---- VLS Moves Operations