aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/gimple-isel.cc3
-rw-r--r--gcc/testsuite/gcc.dg/pr105528.c23
2 files changed, 25 insertions, 1 deletions
diff --git a/gcc/gimple-isel.cc b/gcc/gimple-isel.cc
index 4b309a0..44d086d 100644
--- a/gcc/gimple-isel.cc
+++ b/gcc/gimple-isel.cc
@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see
/* Expand all ARRAY_REF(VIEW_CONVERT_EXPR) gimple assignments into calls to
internal function based on vector type of selected expansion.
i.e.:
- VIEW_CONVERT_EXPR<int[4]>(u)[_1] = = i_4(D);
+ VIEW_CONVERT_EXPR<int[4]>(u)[_1] = i_4(D);
=>
_7 = u;
_8 = .VEC_SET (_7, i_4(D), _1);
@@ -104,6 +104,7 @@ gimple_expand_vec_set_expr (struct function *fun, gimple_stmt_iterator *gsi)
if (gsi_remove (gsi, true)
&& gimple_purge_dead_eh_edges (bb))
cfg_changed = true;
+ *gsi = gsi_for_stmt (ass_stmt);
}
}
diff --git a/gcc/testsuite/gcc.dg/pr105528.c b/gcc/testsuite/gcc.dg/pr105528.c
new file mode 100644
index 0000000..e380d56
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr105528.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/105528 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wno-psabi -fcompare-debug" } */
+/* { dg-additional-options "-mavx512f" { target i?86-*-* x86_64-*-* } } */
+
+typedef unsigned V __attribute__((__vector_size__ (64)));
+V g;
+
+V
+bar (V v)
+{
+ V w;
+ v <<= (V){(V){}[53]} >= v & 5;
+ w[w[5]] -= ~0;
+ v %= ~0;
+ return v + w;
+}
+
+void
+foo (void)
+{
+ g -= (V){bar((V){~0})[3]};
+}