target/97192 - new testcase for fixed PR
authorRichard Biener <rguenther@suse.de>
Thu, 24 Sep 2020 11:27:49 +0000 (13:27 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 24 Sep 2020 11:29:05 +0000 (13:29 +0200)
This adds another testcase for the PR97085 fix.

2020-09-24  Richard Biener  <rguenther@suse.de>

PR tree-optimization/97085
* gcc.dg/pr97192.c: New testcase.

gcc/testsuite/gcc.dg/pr97192.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/pr97192.c b/gcc/testsuite/gcc.dg/pr97192.c
new file mode 100644 (file)
index 0000000..16647ca
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O -ftracer" } */
+/* { dg-additional-options "-mavx512vl" { target x86_64-*-* i?86-*-* } } */
+
+typedef int __attribute__ ((__vector_size__ (32))) V;
+
+int a, b;
+V v;
+
+int
+foo (void)
+{
+  b -= 4 - !a;
+  V u = 0 != v == a;
+  return u[0];
+}