re PR tree-optimization/50955 (IVopts incorrectly rewrite the address of a global memory access into a local form.)

2012-02-06  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/50955
	* tree-ssa-loop-ivopts.c (get_computation_cost_at): Artificially
	raise cost of expressions that replace an address with an
	expression based on a different pointer.

From-SVN: r183934
This commit is contained in:
Richard Guenther 2012-02-06 13:43:03 +00:00 committed by Richard Biener
parent 2c8b5d61bc
commit 1d30a09a48
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2012-02-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50955
* tree-ssa-loop-ivopts.c (get_computation_cost_at): Artificially
raise cost of expressions that replace an address with an
expression based on a different pointer.
2012-02-06 Jakub Jelinek <jakub@redhat.com>
PR target/52129

View File

@ -4048,7 +4048,11 @@ get_computation_cost_at (struct ivopts_data *data,
return infinite_cost;
}
if (address_p)
if (address_p
|| (use->iv->base_object
&& cand->iv->base_object
&& POINTER_TYPE_P (TREE_TYPE (use->iv->base_object))
&& POINTER_TYPE_P (TREE_TYPE (cand->iv->base_object))))
{
/* Do not try to express address of an object with computation based
on address of a different object. This may cause problems in rtl