aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenth@gcc.gnu.org>2005-05-19 19:17:49 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2005-05-19 19:17:49 +0000
commit62b37d918eeaa7ce7ae292f4091c436fcb60f752 (patch)
treeff18cdadfcfca51bf81c0fa01159f46d7581196a
parent2e8a88f0b25731c32ee15fb7deb1d75bc38e6c35 (diff)
downloadgcc-62b37d918eeaa7ce7ae292f4091c436fcb60f752.zip
gcc-62b37d918eeaa7ce7ae292f4091c436fcb60f752.tar.gz
gcc-62b37d918eeaa7ce7ae292f4091c436fcb60f752.tar.bz2
tree-ssa-loop-ivopts.c (determine_base_object): Use build_fold_addr_expr to generate trees of correct type.
2005-05-19 Richard Guenther <rguenth@gcc.gnu.org> * tree-ssa-loop-ivopts.c (determine_base_object): Use build_fold_addr_expr to generate trees of correct type. Use fold_buildN if possible. From-SVN: r99981
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-ssa-loop-ivopts.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 51df4dc..81ea098 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-19 Richard Guenther <rguenth@gcc.gnu.org>
+
+ * tree-ssa-loop-ivopts.c (determine_base_object): Use
+ build_fold_addr_expr to generate trees of correct type.
+ Use fold_buildN if possible.
+
2005-05-19 Jan Hubicka <jh@suse.cz>
* basic-block.h (REG_BR_PROB_BASE): Define.
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index af121c4..f60082a 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -791,7 +791,8 @@ determine_base_object (tree expr)
if (TREE_CODE (base) == INDIRECT_REF)
return determine_base_object (TREE_OPERAND (base, 0));
- return fold (build1 (ADDR_EXPR, ptr_type_node, base));
+ return fold_convert (ptr_type_node,
+ build_fold_addr_expr (base));
case PLUS_EXPR:
case MINUS_EXPR:
@@ -804,9 +805,9 @@ determine_base_object (tree expr)
if (!op0)
return (code == PLUS_EXPR
? op1
- : fold (build1 (NEGATE_EXPR, ptr_type_node, op1)));
+ : fold_build1 (NEGATE_EXPR, ptr_type_node, op1));
- return fold (build (code, ptr_type_node, op0, op1));
+ return fold_build2 (code, ptr_type_node, op0, op1);
case NOP_EXPR:
case CONVERT_EXPR: