https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110897

--- Comment #18 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
(In reply to JuzheZhong from comment #17)
> Confirm by this try:
> https://godbolt.org/z/q7zx5zG5e
> 
> Both ARM SVE trunk GCC and RISC-V GCC failed to vectorize simple
> unsigned short shift right, with following failed information:
> 
> <source>:14:1: missed: couldn't vectorize loop
> <source>:14:1: missed: not vectorized: relevant stmt not supported: patt_47
> = MIN_EXPR <_7, 15>;
> Compiler returned: 0
> 
> This following code can fix it:
> 
> index 2cedf2384..cda27fed9 100644
> --- a/riscv-gcc/gcc/tree-vect-patterns.cc
> +++ b/riscv-gcc/gcc/tree-vect-patterns.cc
> @@ -3133,7 +3133,8 @@ vect_recog_over_widening_pattern (vec_info *vinfo,
>                 return NULL;
>             }
>           else
> -           append_pattern_def_seq (vinfo, last_stmt_info, pattern_stmt);
> +           append_pattern_def_seq (vinfo, last_stmt_info, pattern_stmt,
> +                                   op_vectype);
>           ops[1] = new_var;
>         }
>      }
> 
> 
> Bootstrap and Regression in progress, Ok for trunk ?

Bootstrap and regression on X86 passed.

Reply via email to