public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: gcc-patches@gcc.gnu.org
Cc: richard.guenther@gmail.com, juzhe.zhong@rivai.ai,
	gcc-patches@gcc.gnu.org, Kito Cheng <kito.cheng@gmail.com>,
	kito.cheng@sifive.com, rdapp.gcc@gmail.com
Subject: Re: [PATCH V7] RISC-V: RISC-V: Support gather_load/scatter RVV auto-vectorization
Date: Thu, 13 Jul 2023 07:05:37 -0700 (PDT)	[thread overview]
Message-ID: <mhng-737ed78a-8e6b-4b3e-90e7-bd8d2be74c21@palmer-ri-x1c9a> (raw)
In-Reply-To: <89116e7e-5a62-94ab-4f8e-4561afed8e85@gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]

On Thu, 13 Jul 2023 07:01:26 PDT (-0700), gcc-patches@gcc.gnu.org wrote:
>
>
> On 7/13/23 01:47, Richard Biener wrote:
>> On Thu, Jul 13, 2023 at 1:30 AM 钟居哲 <juzhe.zhong@rivai.ai> wrote:
>>>
>>> I notice vectorizable_call in Loop Vectorizer.
>>> It's vectorizing CALL function for example like fmax/fmin.
>>>  From my understanding, we dont have RVV instruction for fmax/fmin?

Unless I'm misunderstanding, we do.  The ISA manual says

    === Vector Floating-Point MIN/MAX Instructions
    
    The vector floating-point `vfmin` and `vfmax` instructions have the
    same behavior as the corresponding scalar floating-point instructions
    in version 2.2 of the RISC-V F/D/Q extension: they perform the `minimumNumber`
    or `maximumNumber` operation on active elements.
    
    ----
        # Floating-point minimum
        vfmin.vv vd, vs2, vs1, vm   # Vector-vector
        vfmin.vf vd, vs2, rs1, vm   # vector-scalar
    
        # Floating-point maximum
        vfmax.vv vd, vs2, vs1, vm   # Vector-vector
        vfmax.vf vd, vs2, rs1, vm   # vector-scalar
    ----

so we should be able to match at least some loops.

>>
>> There's things like .POPCOUNT which we can vectorize, but sure, it
>> depends on the ISA if there's anything.
> Right.  And RV has some of these -- vcpop, vfirst...  Supporting them
> obviously isn't a requirement for a vector implementation, but they're
> nice to have :-)
>
> Jeff

  reply	other threads:[~2023-07-13 14:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12  9:38 juzhe.zhong
     [not found] ` <66564378DDCC57ED+202307121748494317959@rivai.ai>
2023-07-12 21:22   ` 回复: " 钟居哲
2023-07-12 21:48     ` Jeff Law
2023-07-12 22:17       ` 钟居哲
2023-07-12 22:25         ` Jeff Law
2023-07-12 23:30           ` 钟居哲
2023-07-13  7:47             ` Richard Biener
2023-07-13 14:01               ` Jeff Law
2023-07-13 14:05                 ` Palmer Dabbelt [this message]
2023-07-13 14:32                   ` Robin Dapp
2023-07-13 14:42                     ` 钟居哲
2023-07-13 13:58             ` Jeff Law
2023-07-13  1:12       ` 回复: " Li, Pan2

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mhng-737ed78a-8e6b-4b3e-90e7-bd8d2be74c21@palmer-ri-x1c9a \
    --to=palmer@dabbelt.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    --cc=kito.cheng@gmail.com \
    --cc=kito.cheng@sifive.com \
    --cc=rdapp.gcc@gmail.com \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).