Discussion:
[PATCH i386 AVX512] [74/n] Add byte/word max/mix reduction.
Kirill Yukhin
2014-10-09 12:02:48 UTC
Permalink
Hello,

Bootstrapped.
AVX-512* tests on top of patch-set all pass
under simulator.

Is it ok for trunk?

gcc/
* config/i386/i386.c
(emit_reduc_half): Handle V64QI and V32HI mode.
* config/i386/sse.md
(define_mode_iterator VI_AVX512BW): New.
(define_expand "reduc_<code>_<mode>"): Use VI512_48F_12BW.

--
Thanks, K

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 257e12b..e79210c 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -41246,6 +41246,8 @@ emit_reduc_half (rtx dest, rtx src, int i)
GEN_INT (i / 2));
}
break;
+ case V64QImode:
+ case V32HImode:
case V16SImode:
case V16SFmode:
case V8DImode:
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index d4adc33..106fa00 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -509,6 +509,8 @@
(define_mode_iterator VI48_256 [V8SI V4DI])
(define_mode_iterator VI48_512 [V16SI V8DI])
(define_mode_iterator VI4_256_8_512 [V8SI V8DI])
+(define_mode_iterator VI_AVX512BW
+ [V16SI V8DI (V32HI "TARGET_AVX512BW") (V64QI "TARGET_AVX512BW")])

;; Int-float size matches
(define_mode_iterator VI4F_128 [V4SI V4SF])
@@ -2332,9 +2334,9 @@
})

(define_expand "reduc_<code>_<mode>"
- [(umaxmin:VI48_512
- (match_operand:VI48_512 0 "register_operand")
- (match_operand:VI48_512 1 "register_operand"))]
+ [(umaxmin:VI_AVX512BW
+ (match_operand:VI_AVX512BW 0 "register_operand")
+ (match_operand:VI_AVX512BW 1 "register_operand"))]
"TARGET_AVX512F"
{
ix86_expand_reduc (gen_<code><mode>3, operands[0], operands[1]);
Uros Bizjak
2014-10-09 15:50:30 UTC
Permalink
Post by Kirill Yukhin
Hello,
Bootstrapped.
AVX-512* tests on top of patch-set all pass
under simulator.
Is it ok for trunk?
gcc/
* config/i386/i386.c
(emit_reduc_half): Handle V64QI and V32HI mode.
* config/i386/sse.md
(define_mode_iterator VI_AVX512BW): New.
(define_expand "reduc_<code>_<mode>"): Use VI512_48F_12BW.
OK.

Thanks,
Uros.

Loading...