aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-05-15 08:12:49 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-05-15 08:12:49 +0000
commitfdf6a7b900f9cd6fb9ec4f5bb0fc554140d61cea (patch)
tree34c885e5d44d7838ecd0ee28e773f980b624cfef /gcc
parent2d6e460353fd7ad3160faaa96a0174042c6c28f1 (diff)
downloadgcc-fdf6a7b900f9cd6fb9ec4f5bb0fc554140d61cea.zip
gcc-fdf6a7b900f9cd6fb9ec4f5bb0fc554140d61cea.tar.gz
gcc-fdf6a7b900f9cd6fb9ec4f5bb0fc554140d61cea.tar.bz2
re PR tree-optimization/57275 (Error in data dependence analysis during gather vectorization)
2013-05-15 Richard Biener <rguenther@suse.de> PR tree-optimization/57275 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Fix return value for fail to do runtime alias checks for gather loads. * gcc.target/i386/pr57275.c: New testcase. From-SVN: r198918
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57275.c39
-rw-r--r--gcc/tree-vect-data-refs.c4
4 files changed, 52 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f3daf5a..aa1f910 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-05-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57275
+ * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Fix
+ return value for fail to do runtime alias checks for gather loads.
+
2013-05-15 Jan Hubicka <jh@suse.cz>
PR lto/57038
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 383dc9d..984ee6d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57275
+ * gcc.target/i386/pr57275.c: New testcase.
+
2013-05-15 Jan Hubicka <jh@suse.cz>
* gcc.dg/lto/attr-weakref-1_0.c: New testcase.
diff --git a/gcc/testsuite/gcc.target/i386/pr57275.c b/gcc/testsuite/gcc.target/i386/pr57275.c
new file mode 100644
index 0000000..01b9bb4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57275.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -march=native" } */
+
+extern void abort (void);
+
+#define N 1024
+
+float a[N], b[N], c[N];
+int k[N];
+
+__attribute__((noinline, noclone)) void
+f (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ a[i] = b[k[i]];
+ b[i] = c[i];
+ }
+}
+
+int main ()
+{
+ int i;
+
+ for (i = 0; i < N; i++)
+ {
+ k[i] = i%2;
+ b[i] = i;
+ c[i] = 179;
+ }
+
+ f ();
+
+ if (a[2] != 179 || a[3] != 179)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index bf0b510..c26d25d 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -269,7 +269,7 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
DR_REF (drb));
}
- return false;
+ return true;
}
if (dump_enabled_p ())
@@ -305,7 +305,7 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
DR_REF (drb));
}
- return false;
+ return true;
}
if (dump_enabled_p ())