From: Devang Patel Date: Fri, 29 Apr 2005 16:10:12 +0000 (-0700) Subject: re PR tree-optimization/21272 (SSA_NAME def follows use with -ftree-vectorize) X-Git-Tag: misc/cutover-cvs2svn~3592 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7dcc58cdbc2de85dd27ac79e20550643c7c8953d;p=thirdparty%2Fgcc.git re PR tree-optimization/21272 (SSA_NAME def follows use with -ftree-vectorize) PR tree-optimization/21272 * tree-if-conv.c (find_phi_replacement_condition): Fix think-o. * gcc.dg/vect/vect-ifcvt-10.c: New. From-SVN: r98998 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f52143430eff..f06eb6cef307 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 fda642096468..81708422136a 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 000000000000..0fbb97f5157b --- /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 4eb5a26e6c9b..ed3f2f712561 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. */