diff options
author | dpatel <dpatel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-29 16:10:12 +0000 |
---|---|---|
committer | dpatel <dpatel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-29 16:10:12 +0000 |
commit | 3d9471be16a43b824571e1fcd447caed2d26280f (patch) | |
tree | bdc73d9225951918387ecd4b42f35ec0db2c2134 | |
parent | 17dc88a9b40b154ecfc8fe7c693efc60a1b3ce0c (diff) | |
download | ppe42-gcc-3d9471be16a43b824571e1fcd447caed2d26280f.tar.gz ppe42-gcc-3d9471be16a43b824571e1fcd447caed2d26280f.zip |
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-ifcvt-10.c | 11 | ||||
-rw-r--r-- | gcc/tree-if-conv.c | 2 |
4 files changed, 22 insertions, 1 deletions
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 <dpatel@apple.com> + + PR tree-optimization/21272 + * tree-if-conv.c (find_phi_replacement_condition): Fix think-o. + 2005-04-29 Kazu Hirata <kazu@cs.umass.edu> * 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 <dpatel@apple.com> + + PR tree-optimization/21272 + * gcc.dg/vect/vect-ifcvt-10.c: New test. + 2005-04-29 Jakub Jelinek <jakub@redhat.com> 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. */ |