diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-29 19:10:25 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-29 19:10:25 +0000 |
commit | 1b927e1cb81240f4d6c73eb7cdec45246f6a3c72 (patch) | |
tree | 56e5cd4a6dc56809fa98da6b09135f74ba2ad785 /gcc/tree-loop-distribution.c | |
parent | 87e27de18fdbc0c21dcbc3108b52cdea8183acad (diff) | |
download | gcc-1b927e1cb81240f4d6c73eb7cdec45246f6a3c72.tar.gz |
2009-01-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r143767
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@143769 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r-- | gcc/tree-loop-distribution.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 745957fcea2..8eca7c02166 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -256,10 +256,15 @@ generate_memset_zero (gimple stmt, tree op0, tree nb_iter, /* Test for a positive stride, iterating over every element. */ if (integer_zerop (fold_build2 (MINUS_EXPR, integer_type_node, DR_STEP (dr), TYPE_SIZE_UNIT (TREE_TYPE (op0))))) - addr_base = fold_build2 (PLUS_EXPR, TREE_TYPE (DR_BASE_ADDRESS (dr)), - DR_BASE_ADDRESS (dr), - size_binop (PLUS_EXPR, - DR_OFFSET (dr), DR_INIT (dr))); + { + tree offset = fold_convert (sizetype, + size_binop (PLUS_EXPR, + DR_OFFSET (dr), + DR_INIT (dr))); + addr_base = fold_build2 (POINTER_PLUS_EXPR, + TREE_TYPE (DR_BASE_ADDRESS (dr)), + DR_BASE_ADDRESS (dr), offset); + } /* Test for a negative stride, iterating over every element. */ else if (integer_zerop (fold_build2 (PLUS_EXPR, integer_type_node, @@ -434,11 +439,13 @@ generate_builtin (struct loop *loop, bitmap partition, bool copy_p) basic_block dest = single_exit (loop)->dest; prop_phis (dest); make_edge (src, dest, EDGE_FALLTHRU); - set_immediate_dominator (CDI_DOMINATORS, dest, src); cancel_loop_tree (loop); for (i = 0; i < nbbs; i++) delete_basic_block (bbs[i]); + + set_immediate_dominator (CDI_DOMINATORS, dest, + recompute_dominator (CDI_DOMINATORS, dest)); } end: |