aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr90395.c12
-rw-r--r--gcc/tree-ssa-forwprop.c1
4 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7df4ae6..35badb9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 270453f..f03c445 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..eba8750
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr90395.c
@@ -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 };
+}
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index 7dd1e64..32b5a15 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -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))