From 2b8775f335a64ac0c7a4d32b38ee50463862d6fb Mon Sep 17 00:00:00 2001 From: Ira Rosen Date: Wed, 14 May 2008 12:28:53 +0000 Subject: [PATCH] re PR tree-optimization/36098 (435.gromacs miscompares at -O3) PR tree-optimization/36098 * tree-vect-analyze.c (vect_analyze_group_access): Set the gap value for the first load in the group in case of a gap. (vect_build_slp_tree): Check that there are no gaps in loads. From-SVN: r135290 --- gcc/ChangeLog | 7 ++++++ gcc/testsuite/ChangeLog | 6 +++++ gcc/testsuite/gcc.dg/vect/O3-pr36098.c | 22 ++++++++++++++++++ gcc/testsuite/gcc.dg/vect/vect.exp | 2 +- gcc/tree-vect-analyze.c | 32 ++++++++++++++++++-------- 5 files changed, 58 insertions(+), 11 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/vect/O3-pr36098.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 223fe39ad03..9e151ea6984 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2008-05-14 Ira Rosen + + PR tree-optimization/36098 + * tree-vect-analyze.c (vect_analyze_group_access): Set the gap + value for the first load in the group in case of a gap. + (vect_build_slp_tree): Check that there are no gaps in loads. + 2008-05-14 Kenneth Zadeck * doc/rtl.texi: Removed reference to REG_NO_CONFLICT notes. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 05a2d2569a0..bd147b45a52 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-05-14 Ira Rosen + + PR tree-optimization/36098 + * gcc.dg/vect/vect.exp: Compile with -O3 all the tests named "O3-*". + * gcc.dg/vect/O3-pr36098.c: New test. + 2008-05-14 Samuel Tardieu * gnat.dg/old_errors.ads, gnat.dg/old_errors.adb: New. diff --git a/gcc/testsuite/gcc.dg/vect/O3-pr36098.c b/gcc/testsuite/gcc.dg/vect/O3-pr36098.c new file mode 100644 index 00000000000..1c445be9e20 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/O3-pr36098.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_int } */ + +typedef struct { + int iatom[3]; + int blocknr; +} t_sortblock; + +#define DIM 3 + +void foo (int ncons, t_sortblock *sb, int *iatom) +{ + int i, m; + + for(i=0; (i