re PR target/87561 (416.gamess is slower by ~10% starting from r264866 with -Ofast)
authorRichard Biener <rguenther@suse.de>
Mon, 18 Mar 2019 09:16:56 +0000 (09:16 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 18 Mar 2019 09:16:56 +0000 (09:16 +0000)
2019-03-18  Richard Biener  <rguenther@suse.de>

PR target/87561
* config/i386/i386.c (ix86_add_stmt_cost): Apply strided
load pessimization to stores as well.

From-SVN: r269753

gcc/ChangeLog
gcc/config/i386/i386.c

index 7580713c8cf97372dd39f24db70decebce2614ea..a67a0bf744148c39a146c1381dc2f19806005ac3 100644 (file)
@@ -1,3 +1,9 @@
+2019-03-18  Richard Biener  <rguenther@suse.de>
+
+       PR target/87561
+       * config/i386/i386.c (ix86_add_stmt_cost): Apply strided
+       load pessimization to stores as well.
+
 2019-03-18  Andrey Belevantsev  <abel@ispras.ru>
 
        PR middle-end/86979
index 70e101192134cc26603ecf554c31826c5959a8a8..67af1374ed6720cb2deb17e2350f736fb3141f1a 100644 (file)
@@ -50564,9 +50564,10 @@ ix86_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind,
      latency and execution resources for the many scalar loads
      (AGU and load ports).  Try to account for this by scaling the
      construction cost by the number of elements involved.  */
-  if (kind == vec_construct
+  if ((kind == vec_construct || kind == vec_to_scalar)
       && stmt_info
-      && STMT_VINFO_TYPE (stmt_info) == load_vec_info_type
+      && (STMT_VINFO_TYPE (stmt_info) == load_vec_info_type
+         || STMT_VINFO_TYPE (stmt_info) == store_vec_info_type)
       && STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_info) == VMAT_ELEMENTWISE
       && TREE_CODE (DR_STEP (STMT_VINFO_DATA_REF (stmt_info))) != INTEGER_CST)
     {