Re: [PATCH V4] RISC-V: Support Dynamic LMUL Cost model

2023-09-12 Thread Robin Dapp via Gcc-patches
> This is first version of dynamic LMUL. > I didn't test it with full GCC testsuite. > > My plan is to first pass all GCC testsuite (including vect.exp) with default > LMUL = M1. > Then enable dynamic LMUL to test it. > > Maybe we could tolerate this ICE issue for now. Then we can test it >

Re: Re: [PATCH V4] RISC-V: Support Dynamic LMUL Cost model

2023-09-12 Thread juzhe.zh...@rivai.ai
Then you don't need to waste time on reduce the case from SPEC. juzhe.zh...@rivai.ai From: juzhe.zh...@rivai.ai Date: 2023-09-12 17:36 To: Robin Dapp; gcc-patches CC: Robin Dapp; kito.cheng; Kito.cheng; jeffreyalaw Subject: Re: Re: [PATCH V4] RISC-V: Support Dynamic LMUL Cost model

Re: Re: [PATCH V4] RISC-V: Support Dynamic LMUL Cost model

2023-09-12 Thread juzhe.zh...@rivai.ai
; jeffreyalaw Subject: Re: [PATCH V4] RISC-V: Support Dynamic LMUL Cost model > Is calculix big ? It's 7 nested for loops IIRC and, when unrolling, can get pretty nasty. I tested with -Ofast -funroll-loops. I think wrf is even larger, maybe I can run a full comparison test tonight to have good cover

Re: [PATCH V4] RISC-V: Support Dynamic LMUL Cost model

2023-09-12 Thread Robin Dapp via Gcc-patches
> Is calculix big ? It's 7 nested for loops IIRC and, when unrolling, can get pretty nasty. I tested with -Ofast -funroll-loops. I think wrf is even larger, maybe I can run a full comparison test tonight to have good coverage. > Could you give me the testcase to reproduce it? OK, I will try to

Re: Re: [PATCH V4] RISC-V: Support Dynamic LMUL Cost model

2023-09-12 Thread juzhe.zh...@rivai.ai
gcc-patches CC: rdapp.gcc; kito.cheng; kito.cheng; jeffreyalaw Subject: Re: [PATCH V4] RISC-V: Support Dynamic LMUL Cost model I did some benchmarks and, at least for calculix the differences are miniscule. I'd say we can stick with the current approach and improve as needed. However, I noticed I

Re: [PATCH V4] RISC-V: Support Dynamic LMUL Cost model

2023-09-12 Thread Robin Dapp via Gcc-patches
I did some benchmarks and, at least for calculix the differences are miniscule. I'd say we can stick with the current approach and improve as needed. However, I noticed ICEs here: + gcc_assert (biggest_size >= mode_size); and here: + mode = TYPE_MODE (TREE_TYPE (lhs)); when compiling

Re: Re: [PATCH V4] RISC-V: Support Dynamic LMUL Cost model

2023-09-12 Thread juzhe.zh...@rivai.ai
Thanks Robin. I have tried your codes. It works fine and tests passes. Does your code O(nlogn) complexity ? juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-09-12 16:19 To: Juzhe-Zhong; gcc-patches CC: rdapp.gcc; kito.cheng; kito.cheng; jeffreyalaw Subject: Re: [PATCH V4] RISC-V: Support

Re: [PATCH V4] RISC-V: Support Dynamic LMUL Cost model

2023-09-12 Thread Robin Dapp via Gcc-patches
Hi Juzhe, > +max_number_of_live_regs (const basic_block bb, > + const hash_map _ranges, > + unsigned int max_point, machine_mode biggest_mode, > + int lmul) > +{ > + unsigned int max_nregs = 0; > + unsigned int i; > + unsigned int