Tests to confirm PR rtl-optimization is now fixed, remains so.
2020-08-18 Roger Sayle <roger@nextmovesoftware.com>
Zdenek Sojka <zsojka@seznam.cz>
gcc/testsuite/ChangeLog
PR rtl-optimization/96298
* gcc.dg/pr96298.c: New test.
* gcc.target/i386/pr96298.c: New test.
--- /dev/null
+/* PR rtl-optimization/96298 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-tree-forwprop" } */
+
+typedef unsigned char __attribute__ ((__vector_size__ (8))) v64u8;
+
+v64u8 a;
+
+int
+main (void)
+{
+ v64u8 x = (a - 1) ^ -a;
+ for (unsigned i = 0; i < sizeof (x); i++)
+ if (x[i] != 0xff)
+ __builtin_abort ();
+ return 0;
+}
+
--- /dev/null
+/* PR rtl-optimization/96298 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-tree-forwprop -mno-sse" } */
+
+typedef unsigned char __attribute__ ((__vector_size__ (8))) v64u8;
+
+v64u8 a;
+
+int
+main (void)
+{
+ v64u8 x = (a - 1) ^ -a;
+ for (unsigned i = 0; i < sizeof (x); i++)
+ if (x[i] != 0xff)
+ __builtin_abort ();
+ return 0;
+}
+