diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-08 14:58:20 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-08 14:58:20 +0000 |
commit | b62e7449491815b174c0d9cc79b10d3196e3bb06 (patch) | |
tree | 8ce992db0410d47c519f22cd6e164e898ff73164 /gcc/tree-ssa-sccvn.c | |
parent | 6f08371e1fb5b636c15e6180b1aed46c934c66f9 (diff) | |
download | gcc-b62e7449491815b174c0d9cc79b10d3196e3bb06.tar.gz |
2010-07-08 Richard Guenther <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Fix
stmt check for POINTER_PLUS_EXPRs, fix the pointer assignment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161959 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index e0ba0301c64..99598038a3d 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -986,7 +986,7 @@ vn_reference_maybe_forwprop_address (VEC (vn_reference_op_s, heap) **ops, double_int off; def_stmt = SSA_NAME_DEF_STMT (op->op0); - if (!gimple_assign_single_p (def_stmt)) + if (!is_gimple_assign (def_stmt)) return; code = gimple_assign_rhs_code (def_stmt); @@ -1026,7 +1026,7 @@ vn_reference_maybe_forwprop_address (VEC (vn_reference_op_s, heap) **ops, return; off = double_int_add (off, tree_to_double_int (ptroff)); - op->op0 = TREE_OPERAND (ptr, 0); + op->op0 = ptr; } mem_op->op0 = double_int_to_tree (TREE_TYPE (mem_op->op0), off); |