summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-21 12:27:25 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-21 12:27:25 +0000
commita5028f748e79f774033e35d10a4af4d650c2b63a (patch)
treef8347f8c6ccee066dbaca10d552b25a9c762aeb5
parent606da49c0843b670b6216153c1165816fc844a49 (diff)
downloadppe42-gcc-a5028f748e79f774033e35d10a4af4d650c2b63a.tar.gz
ppe42-gcc-a5028f748e79f774033e35d10a4af4d650c2b63a.zip
PR tree-optimization/63563
* tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Bail out if either dra or drb stmts are not normal loads/stores. * gcc.target/i386/pr63563.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@216508 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr63563.c17
-rw-r--r--gcc/tree-vect-data-refs.c7
4 files changed, 33 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 32ba5954eb9..779fef7f241 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-10-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/63563
+ * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Bail out
+ if either dra or drb stmts are not normal loads/stores.
+
2014-10-17 Jakub Jelinek <jakub@redhat.com>
* asan.c (instrument_derefs): Allow instrumentation of odd-sized
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f38e280bc26..5d07e6e762e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/63563
+ * gcc.target/i386/pr63563.c: New test.
+
2014-10-20 Yury Gribov <y.gribov@samsung.com>
Backported from mainline
diff --git a/gcc/testsuite/gcc.target/i386/pr63563.c b/gcc/testsuite/gcc.target/i386/pr63563.c
new file mode 100644
index 00000000000..ce3e4658e75
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr63563.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/63563 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mavx2" } */
+
+struct A { unsigned long a, b, c, d; } a[1024] = { { 0, 1, 2, 3 } }, b;
+
+void
+foo (void)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ {
+ a[i].a = a[i].b = a[i].c = b.c;
+ if (a[i].d)
+ a[i].d = b.d;
+ }
+}
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index a1096fdfcc1..7a222bd209e 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -2530,11 +2530,14 @@ vect_analyze_data_ref_accesses (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo)
over them. The we can just skip ahead to the next DR here. */
/* Check that the data-refs have same first location (except init)
- and they are both either store or load (not load and store). */
+ and they are both either store or load (not load and store,
+ not masked loads or stores). */
if (DR_IS_READ (dra) != DR_IS_READ (drb)
|| !operand_equal_p (DR_BASE_ADDRESS (dra),
DR_BASE_ADDRESS (drb), 0)
- || !dr_equal_offsets_p (dra, drb))
+ || !dr_equal_offsets_p (dra, drb)
+ || !gimple_assign_single_p (DR_STMT (dra))
+ || !gimple_assign_single_p (DR_STMT (drb)))
break;
/* Check that the data-refs have the same constant size and step. */
OpenPOWER on IntegriCloud