Re: Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask

2023-06-28 Thread juzhe.zh...@rivai.ai
...@rivai.ai CC: gcc-patches; kito.cheng; palmer; palmer; jeffreyalaw; Robin Dapp Subject: Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask Do you mind giving some comments about what the difference between the two versions? On Wed, Jun 28, 2023 at 11:14 AM juzhe.zh...@rivai.ai wrote

Re: Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask

2023-06-28 Thread juzhe.zh...@rivai.ai
. Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-06-28 15:17 To: Jeff Law CC: Kito Cheng; juzhe.zh...@rivai.ai; gcc-patches; kito.cheng; palmer; palmer; Robin Dapp Subject: Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask On Wed, Jun 28, 2023 at 6:09 AM Jeff Law via Gcc

Re: Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask

2023-06-28 Thread juzhe.zh...@rivai.ai
bin Dapp Subject: Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask On Wed, Jun 28, 2023 at 6:09 AM Jeff Law via Gcc-patches wrote: > > > > On 6/27/23 21:16, Kito Cheng wrote: > > Do you mind giving some comments about what the difference between the > > two v

Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask

2023-06-28 Thread Richard Biener via Gcc-patches
On Wed, Jun 28, 2023 at 6:09 AM Jeff Law via Gcc-patches wrote: > > > > On 6/27/23 21:16, Kito Cheng wrote: > > Do you mind giving some comments about what the difference between the > > two versions? > And I'd like a before/after assembly code with the example in the commit > message. I didn't

Re: Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask

2023-06-28 Thread juzhe.zh...@rivai.ai
bug of pre-calculated const vector mask I mean the difference between v1 and v2 patch On Wed, Jun 28, 2023 at 12:09 PM Jeff Law wrote: > > > > On 6/27/23 21:16, Kito Cheng wrote: > > Do you mind giving some comments about what the difference between the > > two versions?

Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask

2023-06-28 Thread Kito Cheng via Gcc-patches
I mean the difference between v1 and v2 patch On Wed, Jun 28, 2023 at 12:09 PM Jeff Law wrote: > > > > On 6/27/23 21:16, Kito Cheng wrote: > > Do you mind giving some comments about what the difference between the > > two versions? > And I'd like a before/after assembly code with the example in

Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask

2023-06-27 Thread Jeff Law via Gcc-patches
On 6/27/23 21:16, Kito Cheng wrote: Do you mind giving some comments about what the difference between the two versions? And I'd like a before/after assembly code with the example in the commit message. I didn't see the same behavior when I tried it earlier today and ran out of time to dig

Re: Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask

2023-06-27 Thread juzhe.zh...@rivai.ai
: 2023-06-28 11:16 To: juzhe.zh...@rivai.ai CC: gcc-patches; kito.cheng; palmer; palmer; jeffreyalaw; Robin Dapp Subject: Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask Do you mind giving some comments about what the difference between the two versions? On Wed, Jun 28, 2023 at

Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask

2023-06-27 Thread Kito Cheng via Gcc-patches
rvv-next. > > > juzhe.zh...@rivai.ai > > > From: Juzhe-Zhong > Date: 2023-06-28 09:59 > To: gcc-patches > CC: kito.cheng; kito.cheng; palmer; palmer; jeffreyalaw; rdapp.gcc; > Juzhe-Zhong > Subject: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector ma

Re: [PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask

2023-06-27 Thread juzhe.zh...@rivai.ai
-V: Fix bug of pre-calculated const vector mask This bug blocks the following patches. GCC doesn't know RVV is using compact mask model. Consider this following case: #define N 16 int main () { int8_t mask[N] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1}; int8_t out[N] = {0

[PATCH V2] RISC-V: Fix bug of pre-calculated const vector mask

2023-06-27 Thread Juzhe-Zhong
This bug blocks the following patches. GCC doesn't know RVV is using compact mask model. Consider this following case: #define N 16 int main () { int8_t mask[N] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1}; int8_t out[N] = {0}; for (int8_t i = 0; i < N; ++i) if (mask[i])