diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-26 12:42:41 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-26 12:42:41 +0000 |
commit | 748c2ed21430b9f91454636e083991612ebd460f (patch) | |
tree | 35e0caf1d5d720776b46102650df9fed06448d44 /gcc/tree-affine.c | |
parent | f3599371eb5580c1a1112b1d72fbeada7c5f3594 (diff) | |
download | gcc-748c2ed21430b9f91454636e083991612ebd460f.tar.gz |
2010-11-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46664
* tree-affine.c (aff_combination_to_tree): Add rest last.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167173 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-affine.c')
-rw-r--r-- | gcc/tree-affine.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-affine.c b/gcc/tree-affine.c index a02d56cdc8d..c57eaff2e95 100644 --- a/gcc/tree-affine.c +++ b/gcc/tree-affine.c @@ -434,7 +434,7 @@ tree aff_combination_to_tree (aff_tree *comb) { tree type = comb->type; - tree expr = comb->rest; + tree expr = NULL_TREE; unsigned i; double_int off, sgn; tree type1 = type; @@ -447,6 +447,9 @@ aff_combination_to_tree (aff_tree *comb) expr = add_elt_to_tree (expr, type, comb->elts[i].val, comb->elts[i].coef, comb); + if (comb->rest) + expr = add_elt_to_tree (expr, type, comb->rest, double_int_one, comb); + /* Ensure that we get x - 1, not x + (-1) or x + 0xff..f if x is unsigned. */ if (double_int_negative_p (comb->offset)) |