From: Roger Sayle Date: Tue, 18 Aug 2020 13:45:52 +0000 (+0100) Subject: New tests for PR rtl-optimization/96298. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d850dec9b7bd02ef925def138894402038cca78d;p=gcc.git New tests for PR rtl-optimization/96298. Tests to confirm PR rtl-optimization is now fixed, remains so. 2020-08-18 Roger Sayle Zdenek Sojka gcc/testsuite/ChangeLog PR rtl-optimization/96298 * gcc.dg/pr96298.c: New test. * gcc.target/i386/pr96298.c: New test. --- diff --git a/gcc/testsuite/gcc.dg/pr96298.c b/gcc/testsuite/gcc.dg/pr96298.c new file mode 100644 index 00000000000..8f825751ee4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr96298.c @@ -0,0 +1,18 @@ +/* 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; +} + diff --git a/gcc/testsuite/gcc.target/i386/pr96298.c b/gcc/testsuite/gcc.target/i386/pr96298.c new file mode 100644 index 00000000000..d304ddd29cd --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr96298.c @@ -0,0 +1,18 @@ +/* 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; +} +