]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR tree-optimization/55110 (Internal compiler error in vectorizable_redu...
authorJakub Jelinek <jakub@redhat.com>
Tue, 19 Feb 2013 17:15:53 +0000 (18:15 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 19 Feb 2013 17:15:53 +0000 (18:15 +0100)
Backported from mainline
2012-11-27  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/55110
* tree-vect-loop.c (vectorizable_reduction): Don't assert
that STMT_VINFO_RELATED_STMT of orig_stmt is stmt.

* gcc.dg/pr55110.c: New test.

From-SVN: r196140

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr55110.c [new file with mode: 0644]
gcc/tree-vect-loop.c

index 0f164519f3acbb94d555258152d7285ca1df37d7..8221eaf4cff02c6a215bff68b00726bb812a6b3e 100644 (file)
@@ -1,3 +1,12 @@
+2013-02-19  Jakub Jelinek  <jakub@redhat.com>
+
+       Backported from mainline
+       2012-11-27  Jakub Jelinek  <jakub@redhat.com>
+
+       PR tree-optimization/55110
+       * tree-vect-loop.c (vectorizable_reduction): Don't assert
+       that STMT_VINFO_RELATED_STMT of orig_stmt is stmt.
+
 2013-02-18  Richard Biener  <rguenther@suse.de>
 
        Revert
index 945fbc29ad5a2ac5c80780266c4dd544100db88d..72de831ef2ff09933d3573870ce538a5ba23f6a5 100644 (file)
@@ -1,3 +1,11 @@
+2013-02-19  Jakub Jelinek  <jakub@redhat.com>
+
+       Backported from mainline
+       2012-11-27  Jakub Jelinek  <jakub@redhat.com>
+
+       PR tree-optimization/55110
+       * gcc.dg/pr55110.c: New test.
+
 2013-02-18  Richard Biener  <rguenther@suse.de>
 
        Revert
diff --git a/gcc/testsuite/gcc.dg/pr55110.c b/gcc/testsuite/gcc.dg/pr55110.c
new file mode 100644 (file)
index 0000000..2a031a5
--- /dev/null
@@ -0,0 +1,13 @@
+/* PR tree-optimization/55110 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -ftree-vectorize" } */
+
+int
+foo (int x)
+{
+  int a, b;
+  for (b = 0; b < 8; b++)
+    for (a = 0; a < 2; a++)
+      x /= 3;
+  return x;
+}
index d9732e24d8750eaac284203c6c6dfaa8ec22aa0b..5e7fb6692528c9e450ce7fc1fdfda0b6540a1c44 100644 (file)
@@ -4453,7 +4453,6 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
   if (orig_stmt)
     {
       orig_stmt_info = vinfo_for_stmt (orig_stmt);
-      gcc_assert (STMT_VINFO_RELATED_STMT (orig_stmt_info) == stmt);
       gcc_assert (STMT_VINFO_IN_PATTERN_P (orig_stmt_info));
       gcc_assert (!STMT_VINFO_IN_PATTERN_P (stmt_info));
     }