From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id AEB683858298 for ; Wed, 14 Jun 2023 19:43:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AEB683858298 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-pf1-x432.google.com with SMTP id d2e1a72fcca58-6537d2a8c20so5678640b3a.2 for ; Wed, 14 Jun 2023 12:43:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686771804; x=1689363804; 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=LFTQw9hN3anHQFbjn5RIBGAq4ONIlAxTYbHehoODZiE=; b=Vu0U4QusLnUCigvnQwpKioOLE2iylw4yK/23zMesz26pHNPdRtnSW4MdWee9gs4RW8 AySsFq+Ug6DMxx3tC+gM3aS/u3TlbDdl8YRzM6idLYtsbCkHey87w/lCqp0JcDc0fsqd DHT2aeRqEQ5oktQYTfUPq1HxWdVrPhrGOSk2pXlIbZGGwP8skO72Q25/l57bGUmfu1nn taGN5RdLaPccc9xqsbUP5W1H8ia0Me5tDt9pXkgN3ZML7Jzrh5aCJ7qtQnL+ZVYs9bxP iN6YOYtL8s+YgccU3NB8WgePgUZc14KcDNIyA6NRoyUANO0ac9mewL3UuYJ+qKPj3W1w ul+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686771804; x=1689363804; 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=LFTQw9hN3anHQFbjn5RIBGAq4ONIlAxTYbHehoODZiE=; b=CbgUw93bhXqxsBY1P+DRA2IDzDJme+RQQPAosE4QUk+rGOnAZWSzDLUWJ9fUuKVpFw ypCd66/ulg/kBBE/om5Ltnz/otEtVihqU2BzqnWabgLpIiP+EKk0U4fAfliG/RChFhI0 8ORYWC/XC+LUxNPuHmLpiWxepwAnHIYe+p57jzl2NdAwu4Wjms/mVQo77sn/gvxjLNgS Abn+Jlggt9Pd39AN3uBFQ1rCjFf8aiihOyAe9YsNVQYSN/upBVZSBBaODCBRYO+nWx+U OZoSi/Tssy6ix6VV/72kmIswL31bNWBMY0Ks2FtlrPAu2t1cMtuIhfwZ6WFodm9Dx18l TA4Q== X-Gm-Message-State: AC+VfDxB11dVnr2mqpfp6+iPCkkqo5YbhpoqFMlKYHAKV/zfKB6pscP6 NHxYPXF2MpT8zOH73mMe09g= X-Google-Smtp-Source: ACHHUZ4aT6icwXvoWUDWrlF2BSBO/cw/veId28JbUM0rP4PL4zJGa2q8Le7k1vu4AtkLZXtvw8C+VA== X-Received: by 2002:a05:6a00:b85:b0:657:97f7:1a5 with SMTP id g5-20020a056a000b8500b0065797f701a5mr3686139pfj.23.1686771803679; Wed, 14 Jun 2023 12:43:23 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id g3-20020a62e303000000b0064398fe3451sm10638931pfh.217.2023.06.14.12.43.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jun 2023 12:43:23 -0700 (PDT) Message-ID: <1377c200-9c30-0b7f-0893-0d7d976dfd43@gmail.com> Date: Wed, 14 Jun 2023 13:43:21 -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: Add autovec FP unary operations. Content-Language: en-US To: Robin Dapp , gcc-patches , palmer , Kito Cheng , "juzhe.zhong@rivai.ai" References: <490fd4af-75d2-de76-fa74-f9ebb478b8b8@gmail.com> From: Jeff Law In-Reply-To: <490fd4af-75d2-de76-fa74-f9ebb478b8b8@gmail.com> 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,KAM_SHORT,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/14/23 09:31, Robin Dapp wrote: > Hi, > > this patch adds floating-point autovec expanders for vfneg, vfabs as well as > vfsqrt and the accompanying tests. vfrsqrt7 will be added at a later time. So with vrsqrt7 I think the question turns into will we be able to use it effectively. With its limited initial accuracy, we'll be stuck with another round of Newton-Raphson or Goldschmidt, so we're not likely going to beat the latency of a standard vsqrt. We can use it to improve throughput though since it does pipeline (using the fmacs of course, so there's a definite trade-off if the fmacs are already saturated). > > Similary to the binop tests, there are flavors for zvfh now. Prerequisites > as before. > > Regards > Robin > > gcc/ChangeLog: > > * config/riscv/autovec.md (2): Add unop expanders. > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/rvv/autovec/unop/abs-run.c: Add FP. > * gcc.target/riscv/rvv/autovec/unop/abs-rv32gcv.c: Add FP. > * gcc.target/riscv/rvv/autovec/unop/abs-rv64gcv.c: Add FP. > * gcc.target/riscv/rvv/autovec/unop/abs-template.h: Add FP. > * gcc.target/riscv/rvv/autovec/unop/vneg-run.c: Add FP. > * gcc.target/riscv/rvv/autovec/unop/vneg-rv32gcv.c: Add FP. > * gcc.target/riscv/rvv/autovec/unop/vneg-rv64gcv.c: Add FP. > * gcc.target/riscv/rvv/autovec/unop/vneg-template.h: Add FP. > * gcc.target/riscv/rvv/autovec/unop/abs-zvfh-run.c: New test. > * gcc.target/riscv/rvv/autovec/unop/vfsqrt-run.c: New test. > * gcc.target/riscv/rvv/autovec/unop/vfsqrt-rv32gcv.c: New test. > * gcc.target/riscv/rvv/autovec/unop/vfsqrt-rv64gcv.c: New test. > * gcc.target/riscv/rvv/autovec/unop/vfsqrt-template.h: New test. > * gcc.target/riscv/rvv/autovec/unop/vfsqrt-zvfh-run.c: New test. > * gcc.target/riscv/rvv/autovec/unop/vneg-zvfh-run.c: New test. LGTM. So if Juzhe is happy with it, then it's good to go once dependencies are resolved. jeff