Re: [PATCH v3] RISC-V: Fix code gen for reduction with length 0 [PR118182]

2025-01-06 Thread Kito Cheng
I have a few more thoughts during the vacation: we don't really need those fixes (work around for VL=0) *IF* we know the VL is constant or VLMAX, and that the situation for out-loop reduction, the only thing we need to fix is the in-loop reduction, that should be the only case will affected. On Fr

Re: [PATCH v3] RISC-V: Fix code gen for reduction with length 0 [PR118182]

2024-12-26 Thread Jeff Law
On 12/24/24 2:24 AM, Robin Dapp wrote: `.MASK_LEN_FOLD_LEFT_PLUS`(or `mask_len_fold_left_plus_m`) is expecting the return value will be the start value even if the length is 0. However current code gen in RISC-V backend is not meet that semantic, it will result a random garbage value if lengt

Re: [PATCH v3] RISC-V: Fix code gen for reduction with length 0 [PR118182]

2024-12-24 Thread Robin Dapp
> `.MASK_LEN_FOLD_LEFT_PLUS`(or `mask_len_fold_left_plus_m`) is expecting the > return value will be the start value even if the length is 0. > > However current code gen in RISC-V backend is not meet that semantic, it will > result a random garbage value if length is 0. > > Let example by current

[PATCH v3] RISC-V: Fix code gen for reduction with length 0 [PR118182]

2024-12-23 Thread Kito Cheng
`.MASK_LEN_FOLD_LEFT_PLUS`(or `mask_len_fold_left_plus_m`) is expecting the return value will be the start value even if the length is 0. However current code gen in RISC-V backend is not meet that semantic, it will result a random garbage value if length is 0. Let example by current code gen for