qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC v3 26/71] target/riscv: rvv-1.0: update vext_max_elems() for lo


From: Frank Chang
Subject: Re: [RFC v3 26/71] target/riscv: rvv-1.0: update vext_max_elems() for load/store insns
Date: Sun, 16 Aug 2020 05:59:12 +0800

On Sat, Aug 15, 2020 at 1:29 PM Richard Henderson <richard.henderson@linaro.org> wrote:
On 8/14/20 7:52 PM, Frank Chang wrote:
>     probe_pages(env, base + stride * i, nf * esz, ra, access_type);
> and
>     target_ulong addr = base + stride * i + k * esz;
>
> If we pass ctzl(sizeof(type)) in GEN_VEXT_LD_STRIDE(),
> I would still have to do: (1 << esz) to get the correct element size in the
> above calculations.
> Would it eliminate the performance gain we have in vext_max_elems() instead?

Well, no, it will improve performance, because you'll write

  addr = base + stride * i + (k << esz)

I.e. strength-reduce the multiply to a shift.


This works like a charm.
Thanks for the advice.

Frank Chang 

 
r~


reply via email to

[Prev in Thread] Current Thread [Next in Thread]