diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-05 15:02:58 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-05 15:02:58 +0000 |
commit | 63628665c2ccd9dc9c182cc22b05d5578aa4a523 (patch) | |
tree | 57153e917882d29b3a07fb2c6fe25541a963b12c | |
parent | 390f4a4b5eb4ff6f4f06d7346d641729703bbad6 (diff) | |
download | gcc-63628665c2ccd9dc9c182cc22b05d5578aa4a523.tar.gz |
2013-03-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/56521
* tree-ssa-sccvn.c (set_value_id_for_result): Always initialize
value-id.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196465 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 15 |
2 files changed, 13 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dbef6b39da2..f04cd5703a9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-03-05 Richard Biener <rguenther@suse.de> + + PR tree-optimization/56521 + * tree-ssa-sccvn.c (set_value_id_for_result): Always initialize + value-id. + 2013-03-05 Steven Bosscher <steven@gcc.gnu.org> PR c++/55135 diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 202980c19ef..c63aa2d0eca 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -3954,18 +3954,17 @@ free_scc_vn (void) XDELETE (optimistic_info); } -/* Set *ID if we computed something useful in RESULT. */ +/* Set *ID according to RESULT. */ static void set_value_id_for_result (tree result, unsigned int *id) { - if (result) - { - if (TREE_CODE (result) == SSA_NAME) - *id = VN_INFO (result)->value_id; - else if (is_gimple_min_invariant (result)) - *id = get_or_alloc_constant_value_id (result); - } + if (result && TREE_CODE (result) == SSA_NAME) + *id = VN_INFO (result)->value_id; + else if (result && is_gimple_min_invariant (result)) + *id = get_or_alloc_constant_value_id (result); + else + *id = get_next_value_id (); } /* Set the value ids in the valid hash tables. */ |