auto_vec<slp_tree> worklist;
for (slp_instance instance : bb_vinfo->slp_instances)
- if (!visited.add (SLP_INSTANCE_TREE (instance)))
- worklist.safe_push (SLP_INSTANCE_TREE (instance));
+ {
+ if (SLP_INSTANCE_KIND (instance) == slp_inst_kind_bb_reduc)
+ for (tree op : SLP_INSTANCE_REMAIN_DEFS (instance))
+ if (TREE_CODE (op) == SSA_NAME)
+ scalar_use_map.put (op, 1);
+ if (!visited.add (SLP_INSTANCE_TREE (instance)))
+ worklist.safe_push (SLP_INSTANCE_TREE (instance));
+ }
do
{
if (child && !visited.add (child))
worklist.safe_push (child);
}
- } while (!worklist.is_empty ());
+ }
+ while (!worklist.is_empty ());
visited.empty ();