"juzhe.zh...@rivai.ai" <juzhe.zh...@rivai.ai> writes:
> Hi, Robin, Richard and Richi.
>
> I am wondering whether we can just simply replace the VEC_EXTRACT expander 
> with binary?
>
> Like this :?
>
> DEF_INTERNAL_OPTAB_FN (VEC_EXTRACT, ECF_CONST | ECF_NOTHROW,
> -          vec_extract, vec_extract)
> +          vec_extract, binary)
>
> to fix the sign extend issue.
>
> And remove the vec_extract explicit expander in internal-fn.cc ?

I'm not sure how that would work.  The vec_extract optab takes two
modes whereas binary optabs take one mode.

However:

| #define vec_extract_direct { 3, 3, false }

This looks wrong.  The numbers are argument numbers (or -1 for a return
value).  vec_extract only takes 2 arguments, so 3 looks to be out-of-range.

| #define direct_vec_extract_optab_supported_p direct_optab_supported_p

I would expect this to be convert_optab_supported_p.

On the promoted subreg thing, I think expand_vec_extract_optab_fn
should use expand_fn_using_insn.

Thanks,
Richard

Reply via email to