This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/83008] [performance] Is it better to avoid extra instructions in data passing between loops?
- From: "sergey.shalnov at intel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 24 Dec 2017 08:55:02 +0000
- Subject: [Bug target/83008] [performance] Is it better to avoid extra instructions in data passing between loops?
- Auto-submitted: auto-generated
- References: <bug-83008-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83008
--- Comment #18 from sergey.shalnov at intel dot com ---
Yes, I agree that vector_store stage has it’s own vectorization cost.
And each vector_store has vector_construction stage. These stages are different
in gcc slp (as you know).
To better illustrate my point of view I would like to propose a patch.
I didn’t submit the patch to community yet because I think it is better to
discuss it before that.
index 0ca42b4..72e3123 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1825,7 +1825,7 @@ vect_analyze_slp_cost_1 (slp_instance instance, slp_tree
node,
record_stmt_cost (prologue_cost_vec, 1, vector_load,
stmt_info, 0, vect_prologue);
else if (dt == vect_external_def)
- record_stmt_cost (prologue_cost_vec, 1, vec_construct,
+ record_stmt_cost (prologue_cost_vec, ncopies_for_cost,
vec_construct,
stmt_info, 0, vect_prologue);
}
}