Commit 79855460 by Tom de Vries Committed by Tom de Vries

Handle unused reduction in create_loads_for_reductions

2015-07-16  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (create_loads_for_reductions): Handle case that
	reduction is unused.

From-SVN: r225872
parent ef3b59ac
2015-07-16 Tom de Vries <tom@codesourcery.com>
* tree-parloops.c (create_loads_for_reductions): Handle case that
reduction is unused.
2015-07-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/66894
......
......@@ -1145,6 +1145,10 @@ create_loads_for_reductions (reduction_info **slot, struct clsn_data *clsn_data)
tree name;
tree x;
/* If there's no exit phi, the result of the reduction is unused. */
if (red->keep_res == NULL)
return 1;
gsi = gsi_after_labels (clsn_data->load_bb);
load_struct = build_simple_mem_ref (clsn_data->load);
load_struct = build3 (COMPONENT_REF, type, load_struct, red->field,
......
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