Commit 64d9cb05 by Richard Guenther Committed by Richard Biener

tree-ssa-operands.c (swap_tree_operands): Always adjust existing operand positions.

2011-09-09  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.c (swap_tree_operands): Always adjust
	existing operand positions.

From-SVN: r178723
parent ffd78b30
2011-09-09 Richard Guenther <rguenther@suse.de> 2011-09-09 Richard Guenther <rguenther@suse.de>
* tree-ssa-operands.c (swap_tree_operands): Always adjust
existing operand positions.
2011-09-09 Richard Guenther <rguenther@suse.de>
PR middle-end/50333 PR middle-end/50333
* tree-data-ref.c (split_constant_offset): Do not try to handle * tree-data-ref.c (split_constant_offset): Do not try to handle
ternary ops. ternary ops.
...@@ -1149,7 +1149,8 @@ swap_tree_operands (gimple stmt, tree *exp0, tree *exp1) ...@@ -1149,7 +1149,8 @@ swap_tree_operands (gimple stmt, tree *exp0, tree *exp1)
/* If the operand cache is active, attempt to preserve the relative /* If the operand cache is active, attempt to preserve the relative
positions of these two operands in their respective immediate use positions of these two operands in their respective immediate use
lists. */ lists by adjusting their use pointer to point to the new
operand position. */
if (ssa_operands_active () && op0 != op1) if (ssa_operands_active () && op0 != op1)
{ {
use_optype_p use0, use1, ptr; use_optype_p use0, use1, ptr;
...@@ -1170,14 +1171,12 @@ swap_tree_operands (gimple stmt, tree *exp0, tree *exp1) ...@@ -1170,14 +1171,12 @@ swap_tree_operands (gimple stmt, tree *exp0, tree *exp1)
break; break;
} }
/* If both uses don't have operand entries, there isn't much we can do /* And adjust their location to point to the new position of the
at this point. Presumably we don't need to worry about it. */ operand. */
if (use0 && use1) if (use0)
{ USE_OP_PTR (use0)->use = exp1;
tree *tmp = USE_OP_PTR (use1)->use; if (use1)
USE_OP_PTR (use1)->use = USE_OP_PTR (use0)->use; USE_OP_PTR (use1)->use = exp0;
USE_OP_PTR (use0)->use = tmp;
}
} }
/* Now swap the data. */ /* Now swap the data. */
......
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