This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH i386 AVX512] [6/n] Update prefered modes for vectorizer.
- From: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Richard Henderson <rth at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, kirill dot yukhin at gmail dot com
- Date: Tue, 12 Aug 2014 14:49:38 +0400
- Subject: [PATCH i386 AVX512] [6/n] Update prefered modes for vectorizer.
- Authentication-results: sourceware.org; auth=none
Hello,
Patch allows wider vec int modes.
Bootstrapped.
Is it ok for trunk?
gcc/
* config/i386/i386.c (ix86_preferred_simd_mode): Allow V64QImode and
V32HImode.
--
Thanks, K
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 5a3b67a..183b7be 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -46474,9 +46474,11 @@ ix86_preferred_simd_mode (enum machine_mode mode)
switch (mode)
{
case QImode:
- return (TARGET_AVX && !TARGET_PREFER_AVX128) ? V32QImode : V16QImode;
+ return TARGET_AVX512BW ? V64QImode :
+ (TARGET_AVX && !TARGET_PREFER_AVX128) ? V32QImode : V16QImode;
case HImode:
- return (TARGET_AVX && !TARGET_PREFER_AVX128) ? V16HImode : V8HImode;
+ return TARGET_AVX512BW ? V32HImode :
+ (TARGET_AVX && !TARGET_PREFER_AVX128) ? V16HImode : V8HImode;
case SImode:
return TARGET_AVX512F ? V16SImode :
(TARGET_AVX && !TARGET_PREFER_AVX128) ? V8SImode : V4SImode;