From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id C06783858D20 for ; Mon, 12 Jun 2023 19:16:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C06783858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1b3d8aa2c17so6681865ad.3 for ; Mon, 12 Jun 2023 12:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686597405; x=1689189405; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=NcvLkpf6lSaeKcrBl9sGSMOVy3owopqVuYYAblrCcBE=; b=R0bb8rraHCC14G0XKEx6QpGFGN4zvyN8cL0C48RMNu/XUCO7cDQxDtl2jla37JSAgE kDzeLbR5CbNbQOczmXY7ZjUWfQB6/q7uovnRMWBnPwO9K1WGXCScxQ/UGSKpuonMBXO+ VgsRZciwCl+kVpgtJMSqb98oLJ6/N+ntXssc9oxRWxa5eIdnZjWkNkzFxk2ysk6melea pTyd+wJvnlCqqzOZOxDibGk13CRTGEHxhbA89G1sM8xUSbLdgzUdiQXUQa/KTPvhvuti mcEYR0f4SnDkDPavXZ28bdZ+FcyIMXmSifiP/OqbR+WuHrqxnt7uuRrScUm8++5dMDbE /P6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686597405; x=1689189405; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NcvLkpf6lSaeKcrBl9sGSMOVy3owopqVuYYAblrCcBE=; b=f7hz0sgVU8CLfMmApKkgzQqIFFcUjDCH5gAHee71fArd23SlEoYJifc3N94tdt8JW5 rfWb6bPOti8xg1VFwZO83+m5pJEIvx+ACBXFKeS3zrHrEi3VrvVZeFHJPAAfO3eix7cL vApSq/G1u9jDyK6hq4VYE7jHKbwjTcbDl8+xsX8gr9/xEd2vXGoTtw2DusdmthVr+gmx C0tvdiGJ/R7LUSzPUJMK1uoKQ74JoSuC23UysQJThQhuUbPxgdPM+V5pii5+Y20GT0hw hynOJ1a2xwRhsEEhW4A9vHH8GQz28M0rDHQP0NmeCTQ+/DfztJu7ZzuvxvzhJgStKSZi sErQ== X-Gm-Message-State: AC+VfDwf8laef+ggijQSHDKNHFxYa5Goq8h4xlej1K+Ujo8IbHj9uAgu +Pc0vDSGx4YOFpSMK+EkJnEAPSrCgRU= X-Google-Smtp-Source: ACHHUZ7JUBsq9qyX3vbnCSCYKMJhHmitklq+t4S8rRwu42vx4Mis2vvsT9hBmZwacT69XHmMkqz2sQ== X-Received: by 2002:a17:902:7684:b0:1b3:9d13:34b3 with SMTP id m4-20020a170902768400b001b39d1334b3mr6032756pll.37.1686597404662; Mon, 12 Jun 2023 12:16:44 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id s9-20020a170902a50900b001a505f04a06sm8568642plq.190.2023.06.12.12.16.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jun 2023 12:16:44 -0700 (PDT) Message-ID: Date: Mon, 12 Jun 2023 13:16:42 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] RISC-V: Implement vec_set and vec_extract. Content-Language: en-US To: Robin Dapp , gcc-patches , palmer , Kito Cheng , "juzhe.zhong@rivai.ai" References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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 List-Id: On 6/12/23 08:55, Robin Dapp wrote: > Hi, > > this implements the vec_set and vec_extract patterns for integer and > floating-point data types. For vec_set we broadcast the insert value to > a vector register and then perform a vslideup with effective length 1 to > the requested index. > > vec_extract is done by sliding down the requested element to index 0 > and v(f)mv.[xf].s to a scalar register. > > The patch does not include vector-vector extraction which > will be done at a later time. > > The vec_set tests required a vector calling convention/ABI because > a vector is being returned. I'm currently experimenting with adding > preliminary vector ABI support locally and still finishing some tests > after discussing with Juzhe. Consequently, I would not push this > before ABI support is upstream. I'm not sure how fast the vector ABI stuff is going to move. So I'd be a bit leery of tying this work to the ABI effort, particularly if it's just to test. Could you use asms to force vec_set/vec_extract to cross register files? Jeff