From 76eed9d920fedf44e7c3738acd5e434d3a00a972 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 24 Aug 2015 15:31:02 +0000 Subject: [PATCH] Add a testcase for PR target/66821 PR target/66821 * gcc.target/i386/pr66821.c: New test. From-SVN: r227133 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr66821.c | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr66821.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9161ce4b3b7..0cb80827e3e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-08-24 H.J. Lu + + PR target/66821 + * gcc.target/i386/pr66821.c: New test. + 2015-08-24 H.J. Lu PR target/67329 diff --git a/gcc/testsuite/gcc.target/i386/pr66821.c b/gcc/testsuite/gcc.target/i386/pr66821.c new file mode 100644 index 00000000000..d32f03d5a96 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr66821.c @@ -0,0 +1,15 @@ +/* { dg-do compile { target ia32 } } */ +/* { dg-options "-O2 -fdump-tree-optimized -mtune=iamcu" } */ + +void bar (void); + +void +foo (int x) +{ + if (x != 2 && x != 3 && x != 10 && x != 11 && x != 17 && x != 18 && x != 23) + bar (); +} + +/* Check if the tests have been folded into a bit test. */ +/* { dg-final { scan-tree-dump "(8784908|0x0*860c0c)" "optimized" } } */ +/* { dg-final { scan-tree-dump "(<<|>>)" "optimized" } } */ -- 2.30.2