From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id 48EF63858421 for ; Sat, 18 Nov 2023 09:45:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 48EF63858421 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 48EF63858421 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::52f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700300734; cv=none; b=x0Pi+DQ/wUoxeZvykOpBQtON19DEpS5QvqtFZPBXYQd0QTEJO+s3Sy/hLWfjAe8TtuzB0EM+hwdG5SrRDuYxd1v5vM1XGZVszVaf9g/ecxRNcUZ04U2pibibWkWTCMLENDhTrl2Rf0fRFRdf2aGoT1GSlR5lic/tmwYB29G6Dn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700300734; c=relaxed/simple; bh=nW28ICFI2mY6zgU0na7Y1Qs70kfQrIhxrqq9ogLo4Hs=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=xpPxKDd/gn2LJzYzXgHUNWSAxHYvp0fwusbUq6PtU9sYC6FW6OAJ9g9nyLRYxvYNR/s1y04uZt24MWR86HzwAYW0z9FSmg6ZJFLuISmJPjUekZ77gBQ10PJjy3PAgTP2+U+cz8yNWaheuxQz9zmBb1Z6be7wKdrAa1A4ZxNaB+M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-53e3b8f906fso4044252a12.2 for ; Sat, 18 Nov 2023 01:45:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1700300729; x=1700905529; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=I0lQjK4m+18TuTZ7FZgdiuulLPTJHoQc4DuYx373+l4=; b=qzEAB5n3aJvv6NqKU/pjzP83HY/lzs23z8Ko95y7nJUr9ri2SgEH+tXALRz0nFQo4J uBrtYfPufVSzZhfeEUH3qlwrwUUVyJeZpXPQi3dEFTfl1VQQLSr6yxWD1QT1+cLsqOju A/CVJzQbMTfRCJdZn1WbF3THyHooKUJR37aLFRLpyqUbhzX7d15AGxcPERmKogIjJx4w 69Ur/JFQHRwqiu7PFGb2t8Oj+rTKzuie/7xsOW8ioUc/sIzV8xf0/0yawjGYnjscr4gZ vkzUiEgmoI+W+l1yIvlCCykDRD/m+7TtNK4JPM8xWN7BpXbWNXYMWxrhHywqZLtsZe6g 9adQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700300729; x=1700905529; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=I0lQjK4m+18TuTZ7FZgdiuulLPTJHoQc4DuYx373+l4=; b=OjsYT2ChX0bpLP+rqc3vD0LoYIr43x8pOe07JFNuSZbHyNrDjQ2WhnGGWmSDAeHUbO AmyW63vAg06WPhaIWBKEJ4K9zp1I5Oxl3lwuRfpSsuYh+dlcpVG83oJ+Mdlf0hqumf47 ejzovqarSYznjCrXtX9QCF7jzYly2lzwNHkIFpnypzzQQoj4rtSjKB+Kz9dEqDjhZWuF i5PvfO4FKoIsd4NkHW/ZujrP2xSPzUuaThFbYAdBT0rJthjZ5HFMSrOoo3ZYq5aFnfZ8 UVHPOfyMY/PkQhLfGr3VVd33ZkVGMqE1tayV1/mIv6Eue935lq6W4PdGvtqmsS8qpo3t D9mg== X-Gm-Message-State: AOJu0Yz4NqoSzv9uwTx46kSWWRBfYav//Kpz/QBvCe+Xr+OYBqNxFKGt TXodzqXJ4+2w1Xb3u4EAyJkv/4eDMnfl53V2n8Sfww== X-Google-Smtp-Source: AGHT+IENKjIEw5NEcVDnTwjKhc+W7d0KLvEUcS/9eADm9G4JiqFOWwuloOxqytV+zwDZ74pgdiFwBomfb2IUtIpHUWc= X-Received: by 2002:a17:906:1d6:b0:9fa:cb21:ea08 with SMTP id 22-20020a17090601d600b009facb21ea08mr892266ejj.69.1700300728796; Sat, 18 Nov 2023 01:45:28 -0800 (PST) MIME-Version: 1.0 References: <086123810F5FEA3C+202311171939484236058@rivai.ai> <534975f1-c062-49d5-a9e8-794260a0aba3@gmail.com> In-Reply-To: <534975f1-c062-49d5-a9e8-794260a0aba3@gmail.com> From: Philipp Tomsich Date: Sat, 18 Nov 2023 15:45:17 +0600 Message-ID: Subject: Re: RISC-V: Support XTheadVector extensions To: Jeff Law Cc: "juzhe.zhong@rivai.ai" , gcc-patches , "kito.cheng" , "kito.cheng" , "cooper.joshua" , Robin Dapp , jkridner@beagleboard.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 17 Nov 2023 at 22:47, Jeff Law wrote: > > > > On 11/17/23 04:39, juzhe.zhong@rivai.ai wrote: > > 90% theadvector extension reusing current RVV 1.0 instructions patterns: > > Just change ASM, For example: > > > > @@ -2923,7 +2923,7 @@ (define_insn "*pred_mulh_scalar" > > (match_operand:VFULLI_D 3 "register_operand" "vr,vr, vr, vr")] VMULH) > > (match_operand:VFULLI_D 2 "vector_merge_operand" "vu, 0, vu, 0")))] > > "TARGET_VECTOR" > > - "vmulh.vx\t%0,%3,%z4%p1" > > + "%^vmulh.vx\t%0,%3,%z4%p1" > > [(set_attr "type" "vimul") > > (set_attr "mode" "")]) > > > > + if (letter == '^') > > + { > > + if (TARGET_XTHEADVECTOR) > > + fputs ("th.", file); > > + return; > > + } > I assume this hunk is meant for riscv_output_operand in riscv.cc. We > may also need to add '^' to the punct_valid_p hook. But yes, this is > the preferred way to go when all we need to do is prefix the instruction > with "th.". > > > > > > Btw, stage 1 will close soon. So I will review this patch on GCC-15 as > > long as all other RISC-V maintainers agree. > I *think* it's a gcc-15 issue. Philipp T. and I briefly spoke about > this at the RVI summit a couple weeks back and he indicated the thead > vector work was targeting gcc-15. To restate the intent clearly: - Getting this merged into GCC14 would be our most favored outcome, as boards with XTheadV are quite common in the field: Allwinner D1, BeagleBoard BeagleV-Ahead, Sophgo Milk-V; - If that is not possible and we end up with an "ok for 15", we can still resolve the downstream ecosystem issues (primarily felt by the BeagleV-Ahead community) gracefully. >From our brief discussion, I understood you thought it more realistic to land this early into GCC15. If we end up targeting GCC15, I would still like to achieve an agreement on design early. This would allow our team to make any needed changes and maintain them in a vendor-branch (on the GCC GIT reposirty) until GCC15 opens up. Philipp.