Commit 6cc1d694 by Roger Sayle Committed by Roger Sayle

expr.c (expand_assignment): Optimize away no-op moves where the source and…

expr.c (expand_assignment): Optimize away no-op moves where the source and destination are equal and have...


	* expr.c (expand_assignment): Optimize away no-op moves where the
	source and destination are equal and have no side-effects.

From-SVN: r113009
parent 7304fcb4
2006-04-17 Roger Sayle <roger@eyesopen.com>
* expr.c (expand_assignment): Optimize away no-op moves where the
source and destination are equal and have no side-effects.
2006-04-17 Richard Guenther <rguenther@suse.de>
PR target/26826
......
......@@ -3988,13 +3988,16 @@ expand_assignment (tree to, tree from)
rtx result;
/* Don't crash if the lhs of the assignment was erroneous. */
if (TREE_CODE (to) == ERROR_MARK)
{
result = expand_normal (from);
return;
}
/* Optimize away no-op moves without side-effects. */
if (operand_equal_p (to, from, 0))
return;
/* Assignment of a structure component needs special treatment
if the structure component's rtx is not simply a MEM.
Assignment of an array element at a constant index, and assignment of
......
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