tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Copy alias info.
authorRichard Guenther <rguenther@suse.de>
Mon, 5 Jul 2010 16:06:56 +0000 (16:06 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 5 Jul 2010 16:06:56 +0000 (16:06 +0000)
2010-07-05  Richard Guenther  <rguenther@suse.de>

* tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Copy
alias info.

From-SVN: r161841

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

index f4ad907..737c89f 100644 (file)
@@ -1,5 +1,10 @@
 2010-07-05  Richard Guenther  <rguenther@suse.de>
 
+       * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Copy
+       alias info.
+
+2010-07-05  Richard Guenther  <rguenther@suse.de>
+
        * tree.c (reference_alias_ptr_type): New function.
        * tree.h (reference_alias_ptr_type): Declare.
        * tree-ssa-loop-ivopts.c (copy_ref_info): Restructure to
index db56b93..d9362e5 100644 (file)
@@ -5486,8 +5486,12 @@ rewrite_use_nonlinear_expr (struct ivopts_data *data,
             to still.  */
          && (get_gimple_rhs_num_ops (TREE_CODE (comp))
              >= gimple_num_ops (gsi_stmt (bsi)))))
-    comp = force_gimple_operand_gsi (&bsi, comp, false, SSA_NAME_VAR (tgt),
-                                    true, GSI_SAME_STMT);
+    {
+      comp = force_gimple_operand_gsi (&bsi, comp, true, NULL_TREE,
+                                      true, GSI_SAME_STMT);
+      if (POINTER_TYPE_P (TREE_TYPE (tgt)))
+       duplicate_ssa_name_ptr_info (comp, SSA_NAME_PTR_INFO (tgt));
+    }
 
   if (gimple_code (use->stmt) == GIMPLE_PHI)
     {