From 1be3290eae3005f6d54ed4782b1260fbb8edf49a Mon Sep 17 00:00:00 2001 From: Tehila Meyzels Date: Tue, 23 Oct 2007 07:53:42 +0000 Subject: [PATCH] SMS: Add new testcase Co-Authored-By: Revital Eres From-SVN: r129575 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/sms-2.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/sms-2.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 39758307a1b..9a78b16afe1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-10-23 Tehila Meyzels + Revital Eres + + * testsuite/gcc.dg/sms-2.c: New testcase. + 2007-10-22 David S. Miller * gcc.dg/globalreg-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/sms-2.c b/gcc/testsuite/gcc.dg/sms-2.c new file mode 100644 index 00000000000..fc2f5d11824 --- /dev/null +++ b/gcc/testsuite/gcc.dg/sms-2.c @@ -0,0 +1,34 @@ +/* The same test as 921011-1.c. It can fails on gcc 4.1 due to a dfs + traversal of the loops after versioning. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -fmodulo-sched -dm" } */ + + +void +fun (nb) + int nb; +{ + int th, h, em, nlwm, nlwS, nlw, sy; + + while (nb--) + while (h--) + { + nlw = nlwm; + while (nlw) + { + if (nlwS == 1) + { + } + else + if (nlwS == 1) + { + } + nlwS--; nlw--; + } + if (em) + nlwS--; + if (++sy == th) + sy = 0; + } +}