@@ -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);
new file mode 100644
@@ -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];
+}
new file mode 100644
@@ -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];
+}