This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][RFC] 256bit AVX vectorization support


On 10/11/2010 06:49 PM, H.J. Lu wrote:
>  (define_expand "storent<mode>"
> +  [(set (match_operand:AVX256MODEF2P 0 "memory_operand" "")
> +	(unspec:AVX256MODEF2P
> +	  [(match_operand:AVX256MODEF2P 1 "register_operand" "")]
> +	  UNSPEC_MOVNT))]
> +  "AVX256_VEC_FLOAT_MODE_P (<MODE>mode)"
> +  "")
> +
> +(define_expand "storent<mode>"
>    [(set (match_operand:SSEMODEF2P 0 "memory_operand" "")
>  	(unspec:SSEMODEF2P
>  	  [(match_operand:SSEMODEF2P 1 "register_operand" "")]

Do not duplicate all of these patterns.  Instead create a
mode iterator that only supplies the AVX modes when AVX is
enabled.

> +(define_insn "*vec_concat_lo_<mode>_avx"
> +(define_insn "*vec_concat_hi_<mode>_avx"
> +(define_insn "*vec_concat_lo_<mode>_avx"
> +(define_insn "*vec_concat_hi_<mode>_avx"

Why are you doing this as separate patterns like this?
Canonically, the select goes on the outside of the concat,

  (vec_select (vec_concat x y) (parallel ...))

instead of how you're doing it here.

Indeed, putting the vec_select on the outside would allow
a match_parallel to describe the full permutation of this
insn.  You're only considering half of the cases here.

Cf. avx_vpermilp_parallel and its uses.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]