diff options
author | Richard Guenther <rguenther@suse.de> | 2007-07-16 19:58:45 +0000 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2007-07-16 21:58:45 +0200 |
commit | fd95ee7ca0a96acef25efefe3cd5eb08cc4325d4 (patch) | |
tree | 158f7b814369e53cd38a8463ab92f08668d46f2a /gcc/tree-if-conv.c | |
parent | 19b493f7145a2e096936cd9e0a6d41beb1fc2924 (diff) | |
download | gcc-fd95ee7ca0a96acef25efefe3cd5eb08cc4325d4.zip gcc-fd95ee7ca0a96acef25efefe3cd5eb08cc4325d4.tar.gz gcc-fd95ee7ca0a96acef25efefe3cd5eb08cc4325d4.tar.bz2 |
tree-if-conv.c (find_phi_replacement_condition): Unshare "*cond" before forcing it to gimple operand.
* tree-if-conv.c (find_phi_replacement_condition): Unshare "*cond"
before forcing it to gimple operand.
Co-Authored-By: Uros Bizjak <ubizjak@gmail.com>
From-SVN: r126692
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r-- | gcc/tree-if-conv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index b18de42..044c2b9 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -751,7 +751,7 @@ find_phi_replacement_condition (struct loop *loop, if (TREE_CODE (*cond) == TRUTH_NOT_EXPR) /* We can be smart here and choose inverted condition without switching bbs. */ - *cond = invert_truthvalue (*cond); + *cond = invert_truthvalue (*cond); else /* Select non loop header bb. */ first_edge = second_edge; @@ -770,9 +770,11 @@ find_phi_replacement_condition (struct loop *loop, /* Create temp. for the condition. Vectorizer prefers to have gimple 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_bsi (bsi, *cond, false, NULL_TREE, + 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_bsi (bsi, unshare_expr (*cond), + false, NULL_TREE, true, BSI_SAME_STMT); if (!is_gimple_reg (*cond) && !is_gimple_condexpr (*cond)) { |