summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-28 13:58:29 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-28 13:58:29 +0000
commitc1987637b2b9d22c60cb265174f7198a4ef202dc (patch)
treedfb3c578630060fe190ec6899796ad170063f1cc /gcc/tree-ssa-loop-ivopts.c
parentb56b2d84b37572ac5a764a6c4f98fa0c9acd7d6b (diff)
downloadgcc-c1987637b2b9d22c60cb265174f7198a4ef202dc.tar.gz
2008-11-28 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r142527 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@142258 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r--gcc/tree-ssa-loop-ivopts.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 92d9c751aab..aa0472ea364 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5323,11 +5323,15 @@ rewrite_use_compare (struct ivopts_data *data,
{
tree var = var_at_stmt (data->current_loop, cand, use->stmt);
tree var_type = TREE_TYPE (var);
+ gimple_seq stmts;
compare = iv_elimination_compare (data, use);
bound = unshare_expr (fold_convert (var_type, bound));
- op = force_gimple_operand_gsi (&bsi, bound, true, NULL_TREE,
- true, GSI_SAME_STMT);
+ op = force_gimple_operand (bound, &stmts, true, NULL_TREE);
+ if (stmts)
+ gsi_insert_seq_on_edge_immediate (
+ loop_preheader_edge (data->current_loop),
+ stmts);
gimple_cond_set_lhs (use->stmt, var);
gimple_cond_set_code (use->stmt, compare);