re PR tree-optimization/92645 (Hand written vector code is 450 times slower when...
authorRichard Biener <rguenther@suse.de>
Tue, 3 Dec 2019 07:36:14 +0000 (07:36 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 3 Dec 2019 07:36:14 +0000 (07:36 +0000)
2019-12-03  Richard Biener  <rguenther@suse.de>

PR tree-optimization/92645
* tree-ssa.c (execute_update_addresses_taken): Avoid representing
a full def of a vector via a BIT_INSERT_EXPR.

From-SVN: r278920

gcc/ChangeLog
gcc/tree-ssa.c

index 1766d6a49880c489f5e0fd385062e4911e518c5e..e06244ccaf8a9e0679c933730857f3128f7c8b37 100644 (file)
@@ -1,3 +1,9 @@
+2019-12-03  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/92645
+       * tree-ssa.c (execute_update_addresses_taken): Avoid representing
+       a full def of a vector via a BIT_INSERT_EXPR.
+
 2019-12-02  Bill Schmidt  <wschmidt@linux.ibm.com>
 
         * config/rs6000/rs6000-call.c (rs6000_invalid_builtin): Make
index 24dd8b32f7edd0abb299b7566d8e91808625ba16..8cabbf5a4fdf9df5aaaab99469075e1b0522f347 100644 (file)
@@ -1899,6 +1899,11 @@ execute_update_addresses_taken (void)
                    && bitmap_bit_p (suitable_for_renaming, DECL_UID (sym))
                    && VECTOR_TYPE_P (TREE_TYPE (sym))
                    && TYPE_MODE (TREE_TYPE (sym)) != BLKmode
+                   /* If it is a full replacement we can do better below.  */
+                   && maybe_ne (wi::to_poly_offset
+                                  (TYPE_SIZE_UNIT (TREE_TYPE (lhs))),
+                                wi::to_poly_offset
+                                   (TYPE_SIZE_UNIT (TREE_TYPE (sym))))
                    && known_ge (mem_ref_offset (lhs), 0)
                    && known_gt (wi::to_poly_offset
                                   (TYPE_SIZE_UNIT (TREE_TYPE (sym))),