aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2020-11-05 09:02:29 +0000
committerTamar Christina <tamar.christina@arm.com>2020-11-05 09:02:29 +0000
commite3587a2d8b005d72f882a21864fb132f8a966366 (patch)
tree057abcf3b4403444eac78664cd0483d3f0cd7454 /gcc/tree-vect-loop.c
parent025f434a87336e38bf5140fba2005081876aa911 (diff)
downloadgcc-e3587a2d8b005d72f882a21864fb132f8a966366.zip
gcc-e3587a2d8b005d72f882a21864fb132f8a966366.tar.gz
gcc-e3587a2d8b005d72f882a21864fb132f8a966366.tar.bz2
middle-end: Store and use the SLP instance kind when aborting load/store lanes
This patch stores the SLP instance kind in the SLP instance so that we can use it later when detecting load/store lanes support. This also changes the load/store lane support check to only check if the SLP kind is a store. This means that in order for the load/lanes to work all instances must be of kind store. gcc/ChangeLog: * tree-vect-loop.c (vect_analyze_loop_2): Check kind. * tree-vect-slp.c (vect_build_slp_instance): New. (enum slp_instance_kind): Move to... * tree-vectorizer.h (enum slp_instance_kind): .. Here (SLP_INSTANCE_KIND): New.
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 547894c..ef2ea3d 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -2394,6 +2394,7 @@ start_over:
/* If the loads and stores can be handled with load/store-lane
instructions record it and move on to the next instance. */
if (loads_permuted
+ && SLP_INSTANCE_KIND (instance) == slp_inst_kind_store
&& vect_store_lanes_supported (vectype, group_size, false))
{
FOR_EACH_VEC_ELT (SLP_INSTANCE_LOADS (instance), i, load_node)