Thanks Robin.

> I guess easy enough to change later, so OK.

I see, will take care of this if there is a perf problem later.

Pan

-----Original Message-----
From: Robin Dapp <[email protected]> 
Sent: Thursday, July 9, 2026 4:32 PM
To: Li, Pan2 <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; 
[email protected]; Chen, Ken <[email protected]>; Liu, Hongtao 
<[email protected]>
Subject: Re: [PATCH v1 1/5] RISC-V: Allow RVV register overlap for v[sz]ext.vf4

> +bool
> +is_frac_vlmul_p (machine_mode mode)
> +{
> +  switch (get_vlmul (mode))
> +    {
> +    case LMUL_1:
> +    case LMUL_2:
> +    case LMUL_4:
> +    case LMUL_8:
> +      return false;
> +    case LMUL_F8:
> +    case LMUL_F4:
> +    case LMUL_F2:
> +      return true;
> +    default:
> +      break;
> +    }
> +
> +  gcc_unreachable ();
> +}

The only concern I have here is that we might want to (prematurely) optimize 
this to something like return get_vlmul > 4; rather than a full-blown switch 
case (thinking that the dynamic filter is being called very often).
On the other hand your version is more readable.

I guess easy enough to change later, so OK.

-- 
Regards
 Robin

Reply via email to