diff options
author | Richard Biener <rguenther@suse.de> | 2015-10-09 08:12:18 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-10-09 08:12:18 +0000 |
commit | c0f6274015fa8bc650f9ded206c1a0f602b1254d (patch) | |
tree | a54ff8c6d5c8ec6eb2b4f543dcefbd2c343e3444 /gcc/gimple-match-head.c | |
parent | 2795c84a46d65e5a4bbb548438da597c5863cad9 (diff) |
re PR middle-end/67891 (FAIL: gcc.dg/pr43300.c (internal compiler error) on alpha-linux-gnu)
2015-10-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/67891
* gimple-match.h (gimple_simplified_result_is_gimple_val):
New helper.
(gimple_resimplify1): Declare.
(gimple_resimplify2): Likewise.
(gimple_resimplify3): Likewise.
* gimple-match-head.c (gimple_resimplify1): Export.
(gimple_resimplify2): Likewise.
(gimple_resimplify3): Likewise.
(maybe_push_res_to_seq): Use gimple_simplified_result_is_gimple_val.
* gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
* tree-ssa-sccvn.c (visit_reference_op_load): Use gimple_resimplify1
to avoid creating stmts without VN info.
* gcc.dg/tree-ssa/pr67891.c: New testcase.
From-SVN: r228635
Diffstat (limited to 'gcc/gimple-match-head.c')
-rw-r--r-- | gcc/gimple-match-head.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/gimple-match-head.c b/gcc/gimple-match-head.c index cab77a4e18d..16d8c5b7eb1 100644 --- a/gcc/gimple-match-head.c +++ b/gcc/gimple-match-head.c @@ -83,7 +83,7 @@ constant_for_folding (tree t) *RES_CODE and *RES_OPS with a simplified and/or canonicalized result and returns whether any change was made. */ -static bool +bool gimple_resimplify1 (gimple_seq *seq, code_helper *res_code, tree type, tree *res_ops, tree (*valueize)(tree)) @@ -139,7 +139,7 @@ gimple_resimplify1 (gimple_seq *seq, *RES_CODE and *RES_OPS with a simplified and/or canonicalized result and returns whether any change was made. */ -static bool +bool gimple_resimplify2 (gimple_seq *seq, code_helper *res_code, tree type, tree *res_ops, tree (*valueize)(tree)) @@ -208,7 +208,7 @@ gimple_resimplify2 (gimple_seq *seq, *RES_CODE and *RES_OPS with a simplified and/or canonicalized result and returns whether any change was made. */ -static bool +bool gimple_resimplify3 (gimple_seq *seq, code_helper *res_code, tree type, tree *res_ops, tree (*valueize)(tree)) @@ -308,9 +308,7 @@ maybe_push_res_to_seq (code_helper rcode, tree type, tree *ops, if (rcode.is_tree_code ()) { if (!res - && (TREE_CODE_LENGTH ((tree_code) rcode) == 0 - || ((tree_code) rcode) == ADDR_EXPR) - && is_gimple_val (ops[0])) + && gimple_simplified_result_is_gimple_val (rcode, ops)) return ops[0]; if (mprts_hook) { |