On 11/25/23 09:24, Juzhe-Zhong wrote:
> Come back to review the codes of gather/scatter, notice 
> gather_scatter_valid_offset_mode_p looks odd.
> gather_scatter_valid_offset_mode_p is supposed to block vluxei64/vsuxei64 in 
> RV32 system.
> However, it failed to do that since it is passing data_mode instead of index 
> mode:
> 
> riscv_vector::gather_scatter_valid_offset_mode_p (<RATIO2:MODE>mode)
> It should be RATIO2I instead of RATIO2.
> So we have this following iterators which already can block the this 
> situation:
> 
> (define_mode_iterator RATIO8I [
>   RVVM1QI
>   RVVM2HI
>   RVVM4SI
>   (RVVM8DI "TARGET_VECTOR_ELEN_64 && TARGET_64BIT")
> ])
> 

Ah, good you noticed this.  I had it on my TODO list to check
why we didn't handle several cases properly.  In my patch I
already figured we don't need to "double exclude" the patterns
(in valid_offset_mode_p as well as in the iterator) but didn't
want to change more than necessary.  It looks more reasonable
with your change now.

LGTM.

Regards
 Robin

Reply via email to