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.zh...@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