PR target/55160
* gcc.target/sh/pr55160.c: New.
From-SVN: r193071
+2012-11-01 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/55160
+ * gcc.target/sh/pr55160.c: New.
+
2012-11-01 David Edelsohn <dje.gcc@gmail.com>
* gcc.target/powerpc/vsx-mass-1.c: Check for dot symbols in
--- /dev/null
+/* Check that the decrement-and-test instruction is generated. */
+/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "dt\tr" 2 } } */
+
+int
+test_00 (int* x, int c)
+{
+ int s = 0;
+ int i;
+ for (i = 0; i < c; ++i)
+ s += x[i];
+ return s;
+}
+
+int
+test_01 (int* x, int c)
+{
+ int s = 0;
+ int i;
+ for (i = 0; i < c; ++i)
+ s += *--x;
+ return s;
+}