]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/50727 (ICE with segfault in flow_bb_inside_loop_p)
authorIra Rosen <ira.rosen@linaro.org>
Sun, 16 Oct 2011 13:47:54 +0000 (13:47 +0000)
committerIra Rosen <irar@gcc.gnu.org>
Sun, 16 Oct 2011 13:47:54 +0000 (13:47 +0000)
        PR tree-optimization/50727
        * tree-vect-patterns.c (vect_operation_fits_smaller_type): Add
        DEF_STMT to the list of statements to be replaced by the
        pattern statements.

From-SVN: r180060

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

index c1098502cedc3f1d5225bae3a6590c3d83aebba8..cde00698dfc9554c11a2f2bbd6fa50546d72df9b 100644 (file)
@@ -1,3 +1,10 @@
+2011-10-16  Ira Rosen  <ira.rosen@linaro.org>
+
+       PR tree-optimization/50727
+       * tree-vect-patterns.c (vect_operation_fits_smaller_type): Add
+       DEF_STMT to the list of statements to be replaced by the
+       pattern statements.
+
 2011-10-16  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR rtl-optimization/50615
index 2461aebec16f54dc0a02f406e8695d72a283b208..c449d32f91b093f76efc7d5c02e61145238d66ab 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-16  Ira Rosen  <ira.rosen@linaro.org>
+
+       PR tree-optimization/50727
+       * gcc.dg/vect/pr50727.c: New test.
+
 2011-10-16  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc.dg/vla-23.c: New test.
diff --git a/gcc/testsuite/gcc.dg/vect/pr50727.c b/gcc/testsuite/gcc.dg/vect/pr50727.c
new file mode 100644 (file)
index 0000000..896b614
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+typedef unsigned char uint8_t;
+typedef unsigned long uint32_t;
+void
+f0a (uint32_t * __restrict__ result, uint32_t * arg2,
+     uint8_t * __restrict__ arg4)
+{
+  int idx;
+  for (idx = 0; idx < 429; idx += 1)
+    {
+      uint32_t temp_9;
+      uint32_t temp_11;
+      temp_9 = ((-19 | arg4[idx]) >> arg2[idx]);
+      temp_11 = (((-19 ^ arg4[idx]) & arg2[idx]) ^ temp_9);
+      result[idx] = temp_11;
+    }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
index b43ccc3de59abd5569432114dc4ae7f8764ebf64..da2eb3d9ffe95faa99685a72f3e90800fb0116c5 100644 (file)
@@ -1003,6 +1003,7 @@ vect_operation_fits_smaller_type (gimple stmt, tree def, tree *new_type,
                   || TREE_TYPE (gimple_assign_lhs (new_stmt)) != interm_type)
                 return false;
 
+             VEC_safe_push (gimple, heap, *stmts, def_stmt);
               oprnd = gimple_assign_lhs (new_stmt);
             }
           else