]> gcc.gnu.org Git - gcc.git/commitdiff
re PR target/81616 (Update -mtune=generic for the current Intel and AMD processors)
authorJan Hubicka <hubicka@ucw.cz>
Wed, 10 Jan 2018 11:02:55 +0000 (12:02 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 10 Jan 2018 11:02:55 +0000 (11:02 +0000)
PR target/81616
* i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
* i386.h (TARGET_USE_GATHER): Define.
* x86-tune.def (X86_TUNE_USE_GATHER): New.

From-SVN: r256424

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/x86-tune.def

index 19eea83b82a7815b94f4d182a4b67a8a9bb3baf9..a30e2854555fbee311226f52faa3baff99f96f6e 100644 (file)
@@ -1,3 +1,10 @@
+2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR target/81616
+       * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
+       * i386.h (TARGET_USE_GATHER): Define.
+       * x86-tune.def (X86_TUNE_USE_GATHER): New.
+
 2018-01-10  Martin Liska  <mliska@suse.cz>
 
        PR bootstrap/82831
index 8696f931806fe8f1aa17aa526d3a15062b5dbe43..d10b1371bcca0901f32de4760648f588f9485c8f 100644 (file)
@@ -38233,7 +38233,7 @@ ix86_vectorize_builtin_gather (const_tree mem_vectype,
   bool si;
   enum ix86_builtins code;
 
-  if (! TARGET_AVX2)
+  if (! TARGET_AVX2 || !TARGET_USE_GATHER)
     return NULL_TREE;
 
   if ((TREE_CODE (index_type) != INTEGER_TYPE
index 93b7a2c5915bfc3240ff74cae148445dddea5c97..6928f809d99e16777a71b7aea61df6c34e42cde2 100644 (file)
@@ -498,6 +498,8 @@ extern unsigned char ix86_tune_features[X86_TUNE_LAST];
        ix86_tune_features[X86_TUNE_SLOW_PSHUFB]
 #define TARGET_AVOID_4BYTE_PREFIXES \
        ix86_tune_features[X86_TUNE_AVOID_4BYTE_PREFIXES]
+#define TARGET_USE_GATHER \
+       ix86_tune_features[X86_TUNE_USE_GATHER]
 #define TARGET_FUSE_CMP_AND_BRANCH_32 \
        ix86_tune_features[X86_TUNE_FUSE_CMP_AND_BRANCH_32]
 #define TARGET_FUSE_CMP_AND_BRANCH_64 \
index 9401d51cdc122d91da62c0b577654a430a07ed21..0bc928b8f8ca565275463db20cf377ce6df5d7f7 100644 (file)
@@ -399,6 +399,10 @@ DEF_TUNE (X86_TUNE_SLOW_PSHUFB, "slow_pshufb",
 DEF_TUNE (X86_TUNE_AVOID_4BYTE_PREFIXES, "avoid_4byte_prefixes",
           m_SILVERMONT | m_INTEL)
 
+/* X86_TUNE_USE_GATHER: Use gather instructions.  */
+DEF_TUNE (X86_TUNE_USE_GATHER, "use_gather",
+          ~(m_ZNVER1 | m_GENERIC))
+
 /*****************************************************************************/
 /* AVX instruction selection tuning (some of SSE flags affects AVX, too)     */
 /*****************************************************************************/
This page took 0.144562 seconds and 5 git commands to generate.