diff options
author | Devang Patel <dpatel@apple.com> | 2005-11-08 12:21:15 -0800 |
---|---|---|
committer | Devang Patel <dpatel@gcc.gnu.org> | 2005-11-08 12:21:15 -0800 |
commit | 90b11b98141152b807f39115ccbc45a1fa4b6556 (patch) | |
tree | 5bd13dafae634219e30f383bea77e97014e3ee50 /gcc/testsuite | |
parent | 30c055954235cea8114e0918f2c35783d28f16f0 (diff) | |
download | gcc-90b11b98141152b807f39115ccbc45a1fa4b6556.zip gcc-90b11b98141152b807f39115ccbc45a1fa4b6556.tar.gz gcc-90b11b98141152b807f39115ccbc45a1fa4b6556.tar.bz2 |
re PR tree-optimization/23115 (-ftree-vectorize generates wrong code)
PR tree-optimization/23115
* tree-if-conv.c (find_phi_replacement_condition): Check domninated_by
relation.
* gcc.dg/tree-ssa/pr23115.c: New.
From-SVN: r106653
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr23115.c | 29 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6d4d60d..6ea0741 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-11-08 Devang Patel <dpatel@apple.com> + + PR tree-optimization/23115 + * gcc.dg/tree-ssa/pr23115.c: New. + 2005-11-08 David Edelsohn <edelsohn@gnu.org> * g++.dg/ext/altivec-{1-13}.C: XFAIL on AIX and SPE. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23115.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23115.c new file mode 100644 index 0000000..6a52aaf --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr23115.c @@ -0,0 +1,29 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize" } */ + +extern void abort (void); + +#define MIN2(a,b) (((a)<(b)) ? (a) : (b)) +#define MAX2(a,b) (((a)>(b)) ? (a) : (b)) + +double p[2] = { 4., 5. }; + +int main() +{ + long j; + double R, n, x; + + n = 1.e300; + x = -1.e300; + for( j=0; j < 2; j++ ) + { + x = MAX2(x,p[j]); + n = MIN2(n,p[j]); + } + R = x-n; + + if( R < 0.1 ) + abort (); + + return 0; +} |