summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.c
diff options
context:
space:
mode:
authordavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-28 05:08:24 +0000
committerdavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-28 05:08:24 +0000
commita7ae69c98e103894686adad9d2f7ab004798b56f (patch)
tree4aac93f0b4fa63b70f418feead28f5de88f862ef /gcc/tree-ssa-loop-ivopts.c
parent574b6863d712ba3dc22f08fe8d6fa1d7e58ca8d0 (diff)
downloadgcc-a7ae69c98e103894686adad9d2f7ab004798b56f.tar.gz
Fix to expose more LIM when creating mem_ref
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162616 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r--gcc/tree-ssa-loop-ivopts.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index ae299886064..478a0190250 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5745,7 +5745,7 @@ rewrite_use_address (struct ivopts_data *data,
aff_tree aff;
gimple_stmt_iterator bsi = gsi_for_stmt (use->stmt);
tree base_hint = NULL_TREE;
- tree ref;
+ tree ref, iv;
bool ok;
adjust_iv_update_pos (cand, use);
@@ -5767,9 +5767,10 @@ rewrite_use_address (struct ivopts_data *data,
if (cand->iv->base_object)
base_hint = var_at_stmt (data->current_loop, cand, use->stmt);
- ref = create_mem_ref (&bsi, TREE_TYPE (*use->op_p),
+ iv = var_at_stmt (data->current_loop, cand, use->stmt);
+ ref = create_mem_ref (&bsi, TREE_TYPE (*use->op_p), &aff,
reference_alias_ptr_type (*use->op_p),
- &aff, base_hint, data->speed);
+ iv, base_hint, data->speed);
copy_ref_info (ref, *use->op_p);
*use->op_p = ref;
}