This just adds the testcase from pr115877. It's working now on the trunk. I'm
not done with cleanups/bugfixing, but there's no reason to not have the
testcase installed at this point.
PR rtl-optimization/115877
gcc/testsuite
* gcc.dg/torture/pr115877.c: New test.
--- /dev/null
+/* { dg-do run { target int128 } } */
+
+char a[16];
+unsigned short u;
+
+__int128
+foo (int i)
+{
+ i -= (unsigned short) ~u;
+ a[(unsigned short) i] = 1;
+ return i;
+}
+
+int
+main ()
+{
+ __int128 x = foo (0);
+ if (x != -0xffff)
+ __builtin_abort();
+}