diff options
author | Richard Guenther <rguenther@suse.de> | 2012-02-06 13:43:03 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-02-06 13:43:03 +0000 |
commit | 1d30a09a480a436248a9f86c933e8b9c71cc0b46 (patch) | |
tree | 3938522d24357ea2d1157b4eae263d988be9e9cf /gcc/tree-ssa-loop-ivopts.c | |
parent | 2c8b5d61bc629ae4468fc9a6cc717b2f0e5032f8 (diff) | |
download | gcc-1d30a09a480a436248a9f86c933e8b9c71cc0b46.zip gcc-1d30a09a480a436248a9f86c933e8b9c71cc0b46.tar.gz gcc-1d30a09a480a436248a9f86c933e8b9c71cc0b46.tar.bz2 |
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
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 15a2dd7..10c9352 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -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 |