aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/visium/loop_clear.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/visium/loop_clear.c')
-rw-r--r--gcc/testsuite/gcc.target/visium/loop_clear.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/visium/loop_clear.c b/gcc/testsuite/gcc.target/visium/loop_clear.c
new file mode 100644
index 00000000000..740e9d2cd67
--- /dev/null
+++ b/gcc/testsuite/gcc.target/visium/loop_clear.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+extern int a[];
+
+void loop_clear (int i)
+{
+ while (i > 0)
+ a[i--] = 0;
+}
+
+/* { dg-final { scan-assembler-times "cmp" 1 { xfail *-*-* } } } */
+
+/* FIXME: the redundant cmp is not eliminated because the compare-elim pass
+ is run before the dbr pass. It's a regression wrt the cc0 port. */