diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-18 08:46:23 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-18 08:46:23 +0000 |
commit | 5dbdbadce9abd166b3e176fb9752352e3bc25027 (patch) | |
tree | 79596190e659803867abccc985dbf62d3ac38592 /gcc/tree-ssa-sccvn.c | |
parent | f6c9396c3cbca6b6c1050d5027019ebb2c21461c (diff) | |
download | gcc-5dbdbadce9abd166b3e176fb9752352e3bc25027.tar.gz |
2007-09-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33340
* tree-ssa-sccvn.c (set_ssa_val_to): Do not set values to
SSA_NAMEs that occur in abnormal PHI nodes.
* g++.dg/torture/pr33340.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128571 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index bca0e8473ae..cddd2d1df58 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -1022,6 +1022,11 @@ set_ssa_val_to (tree from, tree to) { tree currval; + if (from != to + && TREE_CODE (to) == SSA_NAME + && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (to)) + to = from; + /* The only thing we allow as value numbers are VN_TOP, ssa_names and invariants. So assert that here. */ gcc_assert (to != NULL_TREE |