summaryrefslogtreecommitdiff
path: root/gcc/tree-if-conv.c
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-09 13:00:19 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-09 13:00:19 +0000
commit0b6a85ecb520285f1c7e8a25b43c49bec3f98464 (patch)
tree5a8686dc82a58fef1371445e8ca7a4c1722b4d48 /gcc/tree-if-conv.c
parentce9e1d34f3851eb3aa3d69fd08c7601427798b40 (diff)
downloadgcc-0b6a85ecb520285f1c7e8a25b43c49bec3f98464.tar.gz
PR tree-optimization/32681
* tree-if-conv.c (find_phi_replacement_condition): Use the condition saved in second_edge->aux when first_bb is a loop header. testsuite/ChangeLog: PR tree-optimization/32681 * gcc.dg/tree-ssa/pr32681.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126482 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r--gcc/tree-if-conv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index c1ce57ee297..4714bd7bce5 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -751,7 +751,7 @@ find_phi_replacement_condition (struct loop *loop,
AND it with the incoming bb predicate. */
if (second_edge->aux)
*cond = build2 (TRUTH_AND_EXPR, boolean_type_node,
- *cond, first_edge->aux);
+ *cond, second_edge->aux);
if (TREE_CODE (*cond) == TRUTH_NOT_EXPR)
/* We can be smart here and choose inverted