summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-16 19:58:45 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-16 19:58:45 +0000
commit5e13091d5313c768a47371c450fabde2cc2dc3a7 (patch)
tree158f7b814369e53cd38a8463ab92f08668d46f2a
parent250936e20d05937563cc151a8c0106bee1d986ac (diff)
downloadppe42-gcc-5e13091d5313c768a47371c450fabde2cc2dc3a7.tar.gz
ppe42-gcc-5e13091d5313c768a47371c450fabde2cc2dc3a7.zip
* tree-if-conv.c (find_phi_replacement_condition): Unshare "*cond"
before forcing it to gimple operand. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126692 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-if-conv.c10
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2d99d1f180b..ab57f35fa51 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-16 Richard Guenther <rguenther@suse.de>
+ Uros Bizjak <ubizjak@gmail.com>
+
+ * tree-if-conv.c (find_phi_replacement_condition): Unshare "*cond"
+ before forcing it to gimple operand.
+
2007-07-16 Sandra Loosemore <sandra@codesourcery.com>
David Ung <davidu@mips.com>
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index b18de42fd3e..044c2b9598c 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))
{
OpenPOWER on IntegriCloud