From 3d9471be16a43b824571e1fcd447caed2d26280f Mon Sep 17 00:00:00 2001 From: dpatel Date: Fri, 29 Apr 2005 16:10:12 +0000 Subject: PR tree-optimization/21272 * tree-if-conv.c (find_phi_replacement_condition): Fix think-o. * gcc.dg/vect/vect-ifcvt-10.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98998 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/vect/vect-ifcvt-10.c | 11 +++++++++++ gcc/tree-if-conv.c | 2 +- 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/vect/vect-ifcvt-10.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f52143430ef..f06eb6cef30 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-04-29 Devang Patel + + PR tree-optimization/21272 + * tree-if-conv.c (find_phi_replacement_condition): Fix think-o. + 2005-04-29 Kazu Hirata * tree-flow-inline.h: Fix a comment typo. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fda64209646..81708422136 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-04-29 Devang Patel + + PR tree-optimization/21272 + * gcc.dg/vect/vect-ifcvt-10.c: New test. + 2005-04-29 Jakub Jelinek PR fortran/13082 diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-10.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-10.c new file mode 100644 index 00000000000..0fbb97f5157 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-10.c @@ -0,0 +1,11 @@ +/* PR 21272 */ +/* { dg-do compile } */ +double +foo (int j, double *v, double x) +{ + int i; + for (i = 0; i < j; i++) + if (v[i] < x) + x = v[i]; + return x; +} diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 4eb5a26e6c9..ed3f2f71256 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -701,7 +701,7 @@ find_phi_replacement_condition (struct loop *loop, basic_block tmp_bb; tmp_bb = first_bb; first_bb = second_bb; - second_bb = first_bb; + second_bb = tmp_bb; } /* Check if FIRST_BB is loop header or not. */ -- cgit v1.2.1