]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2012-02-06 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Feb 2012 13:43:03 +0000 (13:43 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Feb 2012 13:43:03 +0000 (13:43 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183934 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssa-loop-ivopts.c

index 7effee6db59d5d5652813b644127e1167b8a221f..97ceef1d05f768b10fde10cb190af4fdeb2a22a4 100644 (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
index 15a2dd7bc58238f12a495f63f90293f8f404a6f4..10c9352599ad36a4a414a0e6a86efdcdd05a81e8 100644 (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