diff options
author | Richard Guenther <rguenther@suse.de> | 2006-09-05 08:39:42 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2006-09-05 08:39:42 +0000 |
commit | 575643d56cd35107e7352060f420e93eda8282d5 (patch) | |
tree | 1d8da7d4ffe531ba692eaaf37c1c19d211862241 /gcc/tree-if-conv.c | |
parent | b2db922002d6d95cc0fc2f7965c9a5ba81c6cf5a (diff) | |
download | gcc-575643d56cd35107e7352060f420e93eda8282d5.zip gcc-575643d56cd35107e7352060f420e93eda8282d5.tar.gz gcc-575643d56cd35107e7352060f420e93eda8282d5.tar.bz2 |
re PR tree-optimization/28900 (ICE verify_stmts failed (invalid operand to unary operator))
2006-09-05 Richard Guenther <rguenther@suse.de>
PR tree-optimization/28900
* tree-if-conv.c (find_phi_replacement_condition): Gimplify
compound conditional before creating COND_EXPR condition.
* gcc.dg/torture/pr28900.c: New testcase
From-SVN: r116697
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r-- | gcc/tree-if-conv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index ecd1368..6e16a40 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -666,7 +666,7 @@ find_phi_replacement_condition (struct loop *loop, { basic_block first_bb = NULL; basic_block second_bb = NULL; - tree tmp_cond; + tree tmp_cond, new_stmts; gcc_assert (EDGE_COUNT (bb->preds) == 2); first_bb = (EDGE_PRED (bb, 0))->src; @@ -732,6 +732,9 @@ find_phi_replacement_condition (struct loop *loop, value as condition. Various targets use different means to communicate condition in vector compare operation. Using gimple value allows compiler to emit vector compare and select RTL without exposing compare's result. */ + *cond = force_gimple_operand (*cond, &new_stmts, false, NULL_TREE); + if (new_stmts) + bsi_insert_before (bsi, new_stmts, BSI_SAME_STMT); if (!is_gimple_reg (*cond) && !is_gimple_condexpr (*cond)) { tree new_stmt; |