Commit 2e7565b2 by Richard Biener Committed by Richard Biener

re PR tree-optimization/71893 (gfortran.dg ICEs in gcc/tree-ssa-pre.c; -fcode-hoisting?)

2016-07-18  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71893
	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Compensate
	for sizetype cast added by array_ref_element_size.
	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.

From-SVN: r238426
parent 9c9549e1
2016-07-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/71893
* tree-ssa-pre.c (create_component_ref_by_pieces_1): Compensate
for sizetype cast added by array_ref_element_size.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
2016-07-16 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.c (hppa_profile_hook): Allocate stack space for
......
......@@ -2576,6 +2576,9 @@ create_component_ref_by_pieces_1 (basic_block block, vn_reference_t ref,
{
genop3 = size_binop (EXACT_DIV_EXPR, genop3,
size_int (TYPE_ALIGN_UNIT (elmt_type)));
/* We may have a useless conversion added by
array_ref_element_size via copy_reference_opts_from_ref. */
STRIP_USELESS_TYPE_CONVERSION (genop3);
genop3 = find_or_generate_expression (block, genop3, stmts);
if (!genop3)
return NULL_TREE;
......
......@@ -810,6 +810,9 @@ copy_reference_ops_from_ref (tree ref, vec<vn_reference_op_s> *result)
/* Always record lower bounds and element size. */
temp.op1 = array_ref_low_bound (ref);
temp.op2 = array_ref_element_size (ref);
/* array_ref_element_size forces the result to sizetype
even if that is the same as bitsizetype. */
STRIP_USELESS_TYPE_CONVERSION (temp.op2);
if (TREE_CODE (temp.op0) == INTEGER_CST
&& TREE_CODE (temp.op1) == INTEGER_CST
&& TREE_CODE (temp.op2) == INTEGER_CST)
......
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