re PR tree-optimization/90395 (ICE: verify_flow_info failed (error: BB 2 cannot throw...
authorRichard Biener <rguenther@suse.de>
Thu, 9 May 2019 10:09:30 +0000 (10:09 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 9 May 2019 10:09:30 +0000 (10:09 +0000)
2019-05-09  Richard Biener  <rguenther@suse.de>

PR tree-optimization/90395
* tree-ssa-forwprop.c (pass_forwprop::execute): Do not
rewrite vector stores that throw internally.

* gcc.dg/torture/pr90395.c: New testcase.

From-SVN: r271031

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr90395.c [new file with mode: 0644]
gcc/tree-ssa-forwprop.c

index 7df4ae671de5c75dafe7b204721d52906167dede..35badb9d835960518342f2ecc4a58dba3342f5e1 100644 (file)
@@ -1,3 +1,9 @@
+2019-05-09  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/90395
+       * tree-ssa-forwprop.c (pass_forwprop::execute): Do not
+       rewrite vector stores that throw internally.
+
 2019-05-09  Thomas Schwinge  <thomas@codesourcery.com>
 
        * cif-code.def (CHKP): Remove.
index 270453f247d6399cecb9a726a74386b055dd85c6..f03c44582fdd68a6402a295920dd67339dc27e61 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-09  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/90395
+       * gcc.dg/torture/pr90395.c: New testcase.
+
 2019-05-08  Cherry Zhang  <cherryyz@google.com>
 
        * go.dg/cmpstring.go: New test.
diff --git a/gcc/testsuite/gcc.dg/torture/pr90395.c b/gcc/testsuite/gcc.dg/torture/pr90395.c
new file mode 100644 (file)
index 0000000..eba8750
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fexceptions -fnon-call-exceptions" } */
+
+typedef int v16si __attribute__ ((__vector_size__ (64)));
+
+void
+rl (int uq)
+{
+  v16si qw[1];
+
+  qw[uq] = (v16si) { uq };
+}
index 7dd1e64335ac65d8442e11f95af22e760cb77956..32b5a15151c693337f00800925819f5761f04c76 100644 (file)
@@ -2570,6 +2570,7 @@ pass_forwprop::execute (function *fun)
              if (single_imm_use (lhs, &use_p, &use_stmt)
                  && gimple_store_p (use_stmt)
                  && !gimple_has_volatile_ops (use_stmt)
+                 && !stmt_can_throw_internal (cfun, use_stmt)
                  && is_gimple_assign (use_stmt)
                  && (TREE_CODE (gimple_assign_lhs (use_stmt))
                      != TARGET_MEM_REF))