Thanks Robin.

> Heh, the diff is a bit misleading because the nmsac and macc patterns are 
> almost identical.

Should be git diff issue, I notice this before send it out.

> In principle LGTM but why the renaming to mul_then_plus?  Does it refer
> to one of the overwriting variants?  But the pattern matches both vmacc and 
> vmadd?

The madd and macc can merged into one combine define_expand as well as 
define_insn,
so rename it to mul_then_plus (and add madd part for define_insn) to indicate 
the correct sematics.

But not very sure why diff like this ...

Pan


-----Original Message-----
From: Robin Dapp <[email protected]> 
Sent: Thursday, September 4, 2025 7:20 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/4] RISC-V: Combine vec_duplicate + vmadd.vv to 
vmadd.vx on GR2VR cost

> From: Pan Li <[email protected]>
>
> This patch would like to combine the vec_duplicate + vmadd.vv to the
> vmadd.vx.  From example as below code.  The related pattern will depend
> on the cost of vec_duplicate from GR2VR.  Then the late-combine will
> take action if the cost of GR2VR is zero, and reject the combination
> if the GR2VR cost is greater than zero.

Heh, the diff is a bit misleading because the nmsac and macc patterns are 
almost identical.

In principle LGTM but why the renaming to mul_then_plus?  Does it refer
to one of the overwriting variants?  But the pattern matches both vmacc and 
vmadd?

-- 
Regards
 Robin

Reply via email to