diff options
author | Richard Guenther <rguenther@suse.de> | 2010-07-05 12:20:00 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-07-05 12:20:00 +0000 |
commit | 5d65726326a543c6203dc6c033fd9aba31be5c15 (patch) | |
tree | 76ccfe242e5f15fb4cbc6fe32f20a7346bc63b50 /gcc/tree-ssa-pre.c | |
parent | 3cd0d4fa96b392b70a6b44aa5072a69512d4fbae (diff) | |
download | gcc-5d65726326a543c6203dc6c033fd9aba31be5c15.zip gcc-5d65726326a543c6203dc6c033fd9aba31be5c15.tar.gz gcc-5d65726326a543c6203dc6c033fd9aba31be5c15.tar.bz2 |
re PR middle-end/44784 (Failed to build 403.gcc in SPEC CPU 2006)
2010-07-05 Richard Guenther <rguenther@suse.de>
PR tree-optimization/44784
* tree-ssa-pre.c (bitmap_find_leader): Fix dominance check
for inserted stmts.
(find_or_generate_expression): Fix SCCVN insertion check.
* gcc.c-torture/compile/pr44784.c: New testcase.
From-SVN: r161829
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 97eb7d2..c864eac 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -1955,7 +1955,10 @@ bitmap_find_leader (bitmap_set_t set, unsigned int val, gimple stmt) gimple def_stmt = SSA_NAME_DEF_STMT (PRE_EXPR_NAME (val)); if (gimple_code (def_stmt) != GIMPLE_PHI && gimple_bb (def_stmt) == gimple_bb (stmt) - && gimple_uid (def_stmt) >= gimple_uid (stmt)) + /* PRE insertions are at the end of the basic-block + and have UID 0. */ + && (gimple_uid (def_stmt) == 0 + || gimple_uid (def_stmt) >= gimple_uid (stmt))) continue; } return val; @@ -3021,9 +3024,10 @@ find_or_generate_expression (basic_block block, pre_expr expr, } /* If it's still NULL, it must be a complex expression, so generate - it recursively. Not so for FRE though. */ + it recursively. Not so if inserting expressions for values generated + by SCCVN. */ if (genop == NULL - && !in_fre) + && !domstmt) { bitmap_set_t exprset; unsigned int lookfor = get_expr_value_id (expr); |