Commit d1f1a283 by Bin Cheng Committed by Bin Cheng

tree-affine.c (tree_to_aff_combination): Handle MEM_REF for core part of address expressions.


	* tree-affine.c (tree_to_aff_combination): Handle MEM_REF for
	core part of address expressions.

From-SVN: r210204
parent c7ad3538
2014-05-08 Bin Cheng <bin.cheng@arm.com>
* tree-affine.c (tree_to_aff_combination): Handle MEM_REF for
core part of address expressions.
2014-05-08 Alan Modra <amodra@gmail.com>
PR target/60737
......
......@@ -328,7 +328,14 @@ tree_to_aff_combination (tree expr, tree type, aff_tree *comb)
if (bitpos % BITS_PER_UNIT != 0)
break;
aff_combination_const (comb, type, bitpos / BITS_PER_UNIT);
core = build_fold_addr_expr (core);
if (TREE_CODE (core) == MEM_REF)
{
aff_combination_add_cst (comb, wi::to_widest (TREE_OPERAND (core, 1)));
core = TREE_OPERAND (core, 0);
}
else
core = build_fold_addr_expr (core);
if (TREE_CODE (core) == ADDR_EXPR)
aff_combination_add_elt (comb, core, 1);
else
......
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