From patchwork Wed Oct 4 15:01:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "juzhe.zhong@rivai.ai" X-Patchwork-Id: 148355 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp194902vqb; Wed, 4 Oct 2023 08:02:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZSPBupBeLz1nJyi2CizOE5go6uOvaYD7lYP+rZDyfCI89N03xTRF/oA7A1vXv4VFp8RrG X-Received: by 2002:a17:906:9c9:b0:9ae:4f9e:7813 with SMTP id r9-20020a17090609c900b009ae4f9e7813mr1820678eje.73.1696431739512; Wed, 04 Oct 2023 08:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696431739; cv=none; d=google.com; s=arc-20160816; b=0I5I1hqYpG2vF3+M0WH7m2HQZqoVEzR3114bP9KIl5rjlc4v8sHm0NChlXUsyVZKns b8XQsKDJpcbpHDZgY6zfCyRyOtoXuiuekacHfCZtFpIwwGfNFOCLazfmL9pT5Qy6dk7j PchuFAlWx4+yv0Flu3MbM1rmisdCrlQJWSFJ3mkLCmVnYTcf6Hkb0ogZKHcW4qACQaLT kVcCIRgqz7JR2jes35OanJZRJBuqe+mZEoWnCGG9yKc1caN2TWrd0oluAtSuuQTyc9mJ OnYnYqfEjzPvtlJ9gl7WxYKvzrjwG3XOWrKp99VCQiRvv3HBbGTjGqQ2UM7/v2UTN4XB DZkA== 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:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dmarc-filter:delivered-to; bh=b1wQ3bH+BZnzHBYo3dxrUre5vbVX9N+4+GNc9GcnDJg=; fh=12MRPJmZ1mgDpHqWoogMKqnaGRGM2b7lcuJroqfjJiw=; b=FPjdA7Fv6AfI9KuBjuesZvGtQ1PfH7tRsOjlJAZzdIpke91l2Ulzv2DGGrBD8b6SzW W3Jjx2BaSyulzIX+EK3MvoIAYYExOkARRoopDvSThS+zCR3Goa2JEzIv9LWmyDeg6Q9H 9TqaPNBTPL/M7VxZSJkmrw/Kk4xO9YDODzpVfb8bcK9UL+TPlCrFmWEyse9Qrw29jroK Z5D/259QDgxJHt5eI/W0cZkqXd2aENuV52Mj5zcTlsCmuCip84UAG8aEZuqznkVfyUd/ bhaZqOtw3y+mEH4vRHS97jxo6dMWmSzpI5VTiw8FhojC1ZpaBDQfotRmR2T+Potkl/S/ z+Yw== ARC-Authentication-Results: i=1; mx.google.com; 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 e1-20020a1709062c0100b009ae227bb7f1si1707022ejh.202.2023.10.04.08.02.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 08:02:19 -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; 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 D704B3856092 for ; Wed, 4 Oct 2023 15:01:59 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbgbr1.qq.com (smtpbgbr1.qq.com [54.207.19.206]) by sourceware.org (Postfix) with ESMTPS id B3AC63858C52 for ; Wed, 4 Oct 2023 15:01:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B3AC63858C52 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: bizesmtp68t1696431678tg31u9i3 Received: from rios-cad121.hadoop.rioslab.org ( [58.60.1.9]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 04 Oct 2023 23:01:16 +0800 (CST) X-QQ-SSF: 01400000000000G0V000000A0000000 X-QQ-FEAT: zT6n3Y95oi3HffyeSGrwNWgie9QQIWwhHC48z8uRW+uiBjOsY8MNu40WAIaM8 EoWrkMVlDEH8ZJrGKr1fZY/24mkUaDapMfju6qzcDVNA+ShgGnxR2UxrHZ7grNDAzTF6XX1 7idCIjm5vg9bX5QdKNQ5SPXFXll+myoWRAmismjIsclKyNaKtlhgvNRtziuIQmshLPSow5t EH8/1e3sfP0IsXYnQeOg+Yh2Zxab0hwODZZu+OoSdY+fby6lfERHGYTQEHNtAUyOZXG9Trl eOozF4zrPM3lSsOG9z8TSchosb5ql4GFJa2+uDOoied0Bg203crtmGLmBvuGSBCk+N3HHZw plil31YFvsKp53qWsHEy6ubz7Cy5Y47DlfdVwctRqPdoJkroA3POI2al6W09+Z9Hpx0LDH0 p/8RDtPakIvuMR+Y1Nt55Q== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 5441383911984327680 From: Juzhe-Zhong To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, kito.cheng@sifive.com, jeffreyalaw@gmail.com, rdapp.gcc@gmail.com, Juzhe-Zhong Subject: [PATCH] RISC-V: Remove @ of vec_series Date: Wed, 4 Oct 2023 23:01:15 +0800 Message-Id: <20231004150115.221636-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 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_H3, RCVD_IN_MSPIKE_WL, 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: 1778837608085892894 X-GMAIL-MSGID: 1778837608085892894 gcc/ChangeLog: * config/riscv/autovec.md (@vec_series): Remove @. (vec_series): Ditto. * config/riscv/riscv-v.cc (expand_const_vector): Ditto. (shuffle_decompress_patterns): Ditto. --- gcc/config/riscv/autovec.md | 2 +- gcc/config/riscv/riscv-v.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/config/riscv/autovec.md b/gcc/config/riscv/autovec.md index d6cf376ebca..056f2c352f6 100644 --- a/gcc/config/riscv/autovec.md +++ b/gcc/config/riscv/autovec.md @@ -336,7 +336,7 @@ ;; - vadd.vx/vadd.vi ;; ------------------------------------------------------------------------- -(define_expand "@vec_series" +(define_expand "vec_series" [(match_operand:V_VLSI 0 "register_operand") (match_operand: 1 "reg_or_int_operand") (match_operand: 2 "reg_or_int_operand")] diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc index 29e138e1da2..23633a2a74d 100644 --- a/gcc/config/riscv/riscv-v.cc +++ b/gcc/config/riscv/riscv-v.cc @@ -1014,7 +1014,7 @@ expand_const_vector (rtx target, rtx src) rtx base, step; if (const_vec_series_p (src, &base, &step)) { - emit_insn (gen_vec_series (mode, target, base, step)); + expand_vec_series (target, base, step); return; } @@ -1171,7 +1171,7 @@ expand_const_vector (rtx target, rtx src) rtx step = CONST_VECTOR_ELT (src, 2); /* Step 1 - { base1, base1 + step, base1 + step * 2, ... } */ rtx tmp = gen_reg_rtx (mode); - emit_insn (gen_vec_series (mode, tmp, base1, step)); + expand_vec_series (tmp, base1, step); /* Step 2 - { base0, base1, base1 + step, base1 + step * 2, ... } */ scalar_mode elem_mode = GET_MODE_INNER (mode); if (!rtx_equal_p (base0, const0_rtx)) @@ -3020,7 +3020,7 @@ shuffle_decompress_patterns (struct expand_vec_perm_d *d) /* Generate { 0, 1, .... } mask. */ rtx vid = gen_reg_rtx (sel_mode); rtx vid_repeat = gen_reg_rtx (sel_mode); - emit_insn (gen_vec_series (sel_mode, vid, const0_rtx, const1_rtx)); + expand_vec_series (vid, const0_rtx, const1_rtx); rtx and_ops[] = {vid_repeat, vid, const1_rtx}; emit_vlmax_insn (code_for_pred_scalar (AND, sel_mode), BINARY_OP, and_ops); rtx const_vec = gen_const_vector_dup (sel_mode, 1);