Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering

2023-07-03 Thread Lehua Ding
Commited, thanks Robin, Kito, and Jeff. --Original-- From: "juzhe.zh...@rivai.ai"

Re: Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering

2023-07-03 Thread juzhe.zh...@rivai.ai
Thanks kito. Lehua will merge it for me. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-07-03 17:01 To: Robin Dapp CC: juzhe.zh...@rivai.ai; jeffreyalaw; gcc-patches; Kito.cheng; palmer; palmer Subject: Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering Tried on local

Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering

2023-07-03 Thread Kito Cheng via Gcc-patches
Tried on local, widen-complicate-7.c, widen-complicate-8.c and widen-complicate-9.c need those bridge pattern, otherwise will fail to combine, so give an explicitly LGTM from my side. On Mon, Jul 3, 2023 at 3:48 PM Robin Dapp via Gcc-patches wrote: > > To reiterate, this is OK from my side. As

Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering

2023-07-03 Thread Robin Dapp via Gcc-patches
To reiterate, this is OK from my side. As discussed in the other thread, Jeff would like to have more info on whether a bridge pattern is needed at all and I agreed to get back to it in a while. Until then, we can merge this. Regards Robin

Re: Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering

2023-06-29 Thread juzhe.zh...@rivai.ai
he perfect codegen in my downstream. Thanks. juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-06-30 09:26 To: juzhe.zh...@rivai.ai; gcc-patches CC: kito.cheng; Kito.cheng; palmer; palmer; Robin Dapp Subject: Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering On 6/29/

Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering

2023-06-29 Thread Jeff Law via Gcc-patches
On 6/29/23 19:14, juzhe.zh...@rivai.ai wrote: No, reduction patterns won't help. As I said in vfwmul patch. You should make sure your environment is working then try again. I've triple checked this already. I checked it again and your patch does not impact behavior, nor should it. I

Re: Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering

2023-06-29 Thread juzhe.zh...@rivai.ai
; palmer <mailto:pal...@rivosinc.com>; rdapp.gcc > <mailto:rdapp....@gmail.com> > *Subject:* Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac > combine lowering > On 6/28/23 16:10, 钟居哲 wrot > > Sure. > > > > https://godbolt.o

Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering

2023-06-29 Thread Jeff Law via Gcc-patches
lto:gcc-patches@gcc.gnu.org> *CC:* kito.cheng <mailto:kito.ch...@gmail.com>; kito.cheng <mailto:kito.ch...@sifive.com>; palmer <mailto:pal...@dabbelt.com>; palmer <mailto:pal...@rivosinc.com>; rdapp.gcc <mailto:rdapp....@gmail.com> *Subject:* Re: [

Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering

2023-06-28 Thread Jeff Law via Gcc-patches
On 6/28/23 16:10, 钟居哲 wrote: Sure. https://godbolt.org/z/8857KzTno Failed to match this instruction: (set (reg:VNx2DF 134 [ vect__31.47 ])     (fma:VNx2DF (neg:VNx2DF (float_extend:VNx2DF (reg:VNx2SF 136 [ vect__28.44 ])))         (reg:VNx2DF 150 [

Re: Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering

2023-06-28 Thread 钟居哲
...@rivai.ai From: Jeff Law Date: 2023-06-29 02:16 To: Juzhe-Zhong; gcc-patches CC: kito.cheng; kito.cheng; palmer; palmer; rdapp.gcc Subject: Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering On 6/28/23 05:55, Juzhe-Zhong wrote: > Similar to vfwmacc. Add combine patte

Re: [PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering

2023-06-28 Thread Jeff Law via Gcc-patches
On 6/28/23 05:55, Juzhe-Zhong wrote: Similar to vfwmacc. Add combine patterns as follows: For vfwnmsac: 1. (set (reg) (fma (neg (float_extend (reg))) (float_extend (reg))) (reg) ))) 2. (set (reg) (fma (neg (float_extend (reg))) (reg) (reg) ))) For vfwmsac: 1. (set (reg) (fma (float_extend

[PATCH] RISC-V: Support vfwnmacc/vfwmsac/vfwnmsac combine lowering

2023-06-28 Thread Juzhe-Zhong
Similar to vfwmacc. Add combine patterns as follows: For vfwnmsac: 1. (set (reg) (fma (neg (float_extend (reg))) (float_extend (reg))) (reg) ))) 2. (set (reg) (fma (neg (float_extend (reg))) (reg) (reg) ))) For vfwmsac: 1. (set (reg) (fma (float_extend (reg)) (float_extend (reg))) (neg (reg))