From 3d109462bdd666cc5ce2d0b6b0c3b7a3c19b0b4c Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 3 Dec 2019 07:36:14 +0000 Subject: [PATCH] re PR tree-optimization/92645 (Hand written vector code is 450 times slower when compiled with GCC compared to Clang) 2019-12-03 Richard Biener 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 | 6 ++++++ gcc/tree-ssa.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1766d6a4988..e06244ccaf8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-12-03 Richard Biener + + 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 * config/rs6000/rs6000-call.c (rs6000_invalid_builtin): Make diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 24dd8b32f7e..8cabbf5a4fd 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -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))), -- 2.30.2