From 4149dd37d914325fd275675b29d39049612b0a76 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 24 Apr 2018 08:46:55 +0000 Subject: [PATCH] re PR target/85491 (nbench LU Decomposition test 15% slower than GCC 7, 30% slower than peak) 2018-04-24 Richard Biener PR target/85491 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided load cost increase to the case of non-constant step. From-SVN: r259592 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9e5c6f47ae..933cc292015 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-04-24 Richard Biener + + PR target/85491 + * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided + load cost increase to the case of non-constant step. + 2018-04-24 Jakub Jelinek PR target/84828 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index dc80b34f302..19d1c30514d 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -50550,8 +50550,9 @@ ix86_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind, construction cost by the number of elements involved. */ if (kind == vec_construct && stmt_info - && stmt_info->type == load_vec_info_type - && stmt_info->memory_access_type == VMAT_ELEMENTWISE) + && STMT_VINFO_TYPE (stmt_info) == load_vec_info_type + && STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_info) == VMAT_ELEMENTWISE + && TREE_CODE (DR_STEP (STMT_VINFO_DATA_REF (stmt_info))) != INTEGER_CST) { stmt_cost = ix86_builtin_vectorization_cost (kind, vectype, misalign); stmt_cost *= TYPE_VECTOR_SUBPARTS (vectype); -- 2.30.2