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

--- Comment #12 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to rsand...@gcc.gnu.org from comment #11)
> FWIW, you could try something similar to how aarch64 handles this
> for Advanced SIMD, with a combination of:
> 
> - TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_MODES
> - TARGET_VECTORIZE_RELATED_MODE.
I added a target_hook to return vector mode with same element number for i386
backend.
It works for this case, but regresses many testcases which are related to
gather/scatter instructions, because gather/scatter instructions accept same
vector size but not same element number.

  /* AVX2 */
  def_builtin_pure (OPTION_MASK_ISA_AVX2, 0, "__builtin_ia32_gathersiv2df",
                    V2DF_FTYPE_V2DF_PCDOUBLE_V4SI_V2DF_INT,
                    IX86_BUILTIN_GATHERSIV2DF);

Reply via email to