Commit 45f7faf0 by Richard Biener Committed by Richard Biener

re PR tree-optimization/79683 (SLP vectorizer drops gs: prefix)

2017-02-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79683
	* tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
	vector types for data-refs.

	* gcc.target/i386/pr79683.c: New testcase.

From-SVN: r245679
parent 06393a97
2017-02-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/79683
* tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
vector types for data-refs.
2017-02-23 Martin Liska <mliska@suse.cz> 2017-02-23 Martin Liska <mliska@suse.cz>
* params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0.
......
2017-02-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/79683
* gcc.target/i386/pr79683.c: New testcase.
2017-02-22 Jeff Law <law@redhat.com> 2017-02-22 Jeff Law <law@redhat.com>
PR tree-optimization/79578 PR tree-optimization/79578
......
/* { dg-do compile } */
/* { dg-options "-O3 -msse2" } */
struct s {
__INT64_TYPE__ a;
__INT64_TYPE__ b;
};
void test(struct s __seg_gs *x) {
x->a += 1;
x->b -= 1;
}
/* We get the function vectorized, verify the load and store are
address-space qualified. */
/* { dg-final { scan-assembler-times "padd" 1 } } */
/* { dg-final { scan-assembler-times "%gs" 2 } } */
...@@ -8486,6 +8486,10 @@ vect_analyze_stmt (gimple *stmt, bool *need_to_vectorize, slp_tree node) ...@@ -8486,6 +8486,10 @@ vect_analyze_stmt (gimple *stmt, bool *need_to_vectorize, slp_tree node)
{ {
gcc_assert (PURE_SLP_STMT (stmt_info)); gcc_assert (PURE_SLP_STMT (stmt_info));
/* Memory accesses already got their vector type assigned
in vect_analyze_data_refs. */
if (! STMT_VINFO_DATA_REF (stmt_info))
{
scalar_type = TREE_TYPE (gimple_get_lhs (stmt)); scalar_type = TREE_TYPE (gimple_get_lhs (stmt));
if (dump_enabled_p ()) if (dump_enabled_p ())
{ {
...@@ -8518,6 +8522,7 @@ vect_analyze_stmt (gimple *stmt, bool *need_to_vectorize, slp_tree node) ...@@ -8518,6 +8522,7 @@ vect_analyze_stmt (gimple *stmt, bool *need_to_vectorize, slp_tree node)
STMT_VINFO_VECTYPE (stmt_info) = vectype; STMT_VINFO_VECTYPE (stmt_info) = vectype;
} }
}
if (STMT_VINFO_RELEVANT_P (stmt_info)) if (STMT_VINFO_RELEVANT_P (stmt_info))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment