aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2016-08-04 13:20:57 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2016-08-04 13:20:57 +0000
commit086ad22e0e7bbff4329d0dcbdc1b4be04ba4a868 (patch)
treec1189eb5f7c1e72590aee39e3b908fd9838a97a5 /gcc/testsuite/gcc.c-torture
parent9a8e528cf1e5aa1a7e7fa09716a3b5b87b56dc93 (diff)
downloadgcc-086ad22e0e7bbff4329d0dcbdc1b4be04ba4a868.zip
gcc-086ad22e0e7bbff4329d0dcbdc1b4be04ba4a868.tar.gz
gcc-086ad22e0e7bbff4329d0dcbdc1b4be04ba4a868.tar.bz2
re PR target/70903 (wrong code with bfi @ aarch64 with -Os)
2016-08-04 Bernd Edlinger <bernd.edlinger@hotmail.de> PR rtl-optimization/70903 * cse.c (cse_insn): If DEST is a paradoxical SUBREG, don't record DEST. testsuite: 2016-08-04 Bernd Edlinger <bernd.edlinger@hotmail.de> PR rtl-optimization/70903 * gcc.c-torture/execute/pr70903.c: New test. From-SVN: r239122
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr70903.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr70903.c b/gcc/testsuite/gcc.c-torture/execute/pr70903.c
new file mode 100644
index 0000000..6ffd0aa
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr70903.c
@@ -0,0 +1,38 @@
+typedef unsigned char V8 __attribute__ ((vector_size (32)));
+typedef unsigned int V32 __attribute__ ((vector_size (32)));
+typedef unsigned long long V64 __attribute__ ((vector_size (32)));
+
+static V32 __attribute__ ((noinline, noclone))
+foo (V64 x)
+{
+ V64 y = (V64)(V8){((V8)(V64){65535, x[0]})[1]};
+ return (V32){y[0], 255};
+}
+
+int main ()
+{
+ V32 x = foo ((V64){});
+// __builtin_printf ("%08x %08x %08x %08x %08x %08x %08x %08x\n", x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]);
+ if (x[1] != 255)
+ __builtin_abort();
+ return 0;
+}
+typedef unsigned char V8 __attribute__ ((vector_size (32)));
+typedef unsigned int V32 __attribute__ ((vector_size (32)));
+typedef unsigned long long V64 __attribute__ ((vector_size (32)));
+
+static V32 __attribute__ ((noinline, noclone))
+foo (V64 x)
+{
+ V64 y = (V64)(V8){((V8)(V64){65535, x[0]})[1]};
+ return (V32){y[0], 255};
+}
+
+int main ()
+{
+ V32 x = foo ((V64){});
+// __builtin_printf ("%08x %08x %08x %08x %08x %08x %08x %08x\n", x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]);
+ if (x[1] != 255)
+ __builtin_abort();
+ return 0;
+}