This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH i386 3/8] [AVX512] Add AVX-512 patterns.
- From: Richard Henderson <rth at redhat dot com>
- To: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, Vladimir Makarov <vmakarov at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 19 Aug 2013 15:01:19 -0700
- Subject: Re: [PATCH i386 3/8] [AVX512] Add AVX-512 patterns.
- References: <20130808112524 dot GA40277 at msticlxl57 dot ims dot intel dot com> <20130814072638 dot GD52726 at msticlxl57 dot ims dot intel dot com>
> ;; All vector modes including V?TImode, used in move patterns.
> (define_mode_iterator V16
> - [(V32QI "TARGET_AVX") V16QI
> - (V16HI "TARGET_AVX") V8HI
> - (V8SI "TARGET_AVX") V4SI
> - (V4DI "TARGET_AVX") V2DI
> + [(V64QI "TARGET_AVX512F") (V32QI "TARGET_AVX") V16QI
> + (V32HI "TARGET_AVX512F") (V16HI "TARGET_AVX") V8HI
> + (V16SI "TARGET_AVX512F") (V8SI "TARGET_AVX") V4SI
> + (V8DI "TARGET_AVX512F") (V4DI "TARGET_AVX") V2DI
> (V2TI "TARGET_AVX") V1TI
> - (V8SF "TARGET_AVX") V4SF
> - (V4DF "TARGET_AVX") V2DF])
> + (V16SF "TARGET_AVX512F") (V8SF "TARGET_AVX") V4SF
> + (V8DF "TARGET_AVX512F") (V4DF "TARGET_AVX") V2DF])
Let's rename this VMOVE, and apply only that change as a separate patch.
> +(define_mode_iterator VF_AVX512F
> + [(V16SF "TARGET_AVX512F") (V8SF "TARGET_AVX") V4SF
> + (V8DF "TARGET_AVX512F") (V4DF "TARGET_AVX") (V2DF "TARGET_SSE2")])
> +
Why aren't you modifying VF instead? Certainly this makes the comment for "VF"
be incorrect, as it no longer contains "all vector float modes".
> ;; All SFmode vector float modes
> (define_mode_iterator VF1
> [(V8SF "TARGET_AVX") V4SF])
>
> +(define_mode_iterator VF1_AVX512F
> + [(V16SF "TARGET_AVX512F") (V8SF "TARGET_AVX") V4SF])
Likewise.
> ;; All DFmode vector float modes
> (define_mode_iterator VF2
> [(V4DF "TARGET_AVX") V2DF])
>
> +(define_mode_iterator VF2_AVX512F
> + [(V8DF "TARGET_AVX512F") (V4DF "TARGET_AVX") V2DF])
Likewise.
> +;; 128bit and 512bit float modes
> +(define_mode_iterator VF_128_512
> + [V4SF V2DF V16SF V8DF])
Unused?
> (define_expand "<code><mode>2"
> - [(set (match_operand:VF 0 "register_operand")
> - (absneg:VF
> - (match_operand:VF 1 "register_operand")))]
> + [(set (match_operand:VF_AVX512F 0 "register_operand")
> + (absneg:VF_AVX512F
> + (match_operand:VF_AVX512F 1 "register_operand")))]
> "TARGET_SSE"
> "ix86_expand_fp_absneg_operator (<CODE>, <MODE>mode, operands); DONE;")
Fixing VF as I describe above appears to make a large portion
of the patch just go away.
r~