aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2016-03-29 08:19:00 -0700
committerRichard Henderson <rth@gcc.gnu.org>2016-03-29 08:19:00 -0700
commit2ab9a4a5e07e609cd53c474e6572c1fbc5869d70 (patch)
tree05e79911f749d33ef7696f66cfdfedbf4bf3712c /gcc
parentbef977d413dd0d924d6a89a83c432527c6f4e453 (diff)
downloadgcc-2ab9a4a5e07e609cd53c474e6572c1fbc5869d70.zip
gcc-2ab9a4a5e07e609cd53c474e6572c1fbc5869d70.tar.gz
gcc-2ab9a4a5e07e609cd53c474e6572c1fbc5869d70.tar.bz2
re PR target/70355 (ICE: in simplify_subreg_concatn, at lower-subreg.c:617 with -funroll-loops -mavx512f)
PR middle-end/70355 * lower-subreg.c (simplify_subreg_concatn): Reject paradoxical subregs. From-SVN: r234524
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/lower-subreg.c3
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr70355.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pr70355.c14
4 files changed, 36 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index decdd71..7617d4a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-29 Richard Henderson <rth@redhat.com>
+
+ PR middle-end/70355
+ * lower-subreg.c (simplify_subreg_concatn): Reject paradoxical
+ subregs.
+
2016-03-29 Richard Biener <rguenther@suse.de>
PR middle-end/70424
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c
index 5432d05..f7b3ac4 100644
--- a/gcc/lower-subreg.c
+++ b/gcc/lower-subreg.c
@@ -614,7 +614,8 @@ simplify_subreg_concatn (machine_mode outermode, rtx op,
innermode = GET_MODE (op);
gcc_assert (byte < GET_MODE_SIZE (innermode));
- gcc_assert (GET_MODE_SIZE (outermode) <= GET_MODE_SIZE (innermode));
+ if (GET_MODE_SIZE (outermode) > GET_MODE_SIZE (innermode))
+ return NULL_RTX;
inner_size = GET_MODE_SIZE (innermode) / XVECLEN (op, 0);
part = XVECEXP (op, 0, byte / inner_size);
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr70355.c b/gcc/testsuite/gcc.c-torture/compile/pr70355.c
new file mode 100644
index 0000000..4749427
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr70355.c
@@ -0,0 +1,14 @@
+/* { dg-require-effective-target int128 } */
+/* { dg-additional-options "-g" } */
+
+typedef unsigned __int128 v2ti __attribute__ ((vector_size (32)));
+
+unsigned
+foo (unsigned i, v2ti v)
+{
+ do {
+ i--;
+ v %= ~v;
+ } while (i);
+ return v[0] + v[1];
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr70355.c b/gcc/testsuite/gcc.target/i386/pr70355.c
new file mode 100644
index 0000000..b55f6fc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr70355.c
@@ -0,0 +1,14 @@
+/* { dg-require-effective-target int128 } */
+/* { dg-options "-O2 -fno-tree-ter -funroll-loops -mavx512f -g" } */
+
+typedef unsigned __int128 v2ti __attribute__ ((vector_size (32)));
+
+unsigned
+foo (unsigned i, v2ti v)
+{
+ do {
+ i--;
+ v %= ~v;
+ } while (i);
+ return v[0] + v[1];
+}