Add a testcase for PR target/66821
authorH.J. Lu <hongjiu.lu@intel.com>
Mon, 24 Aug 2015 15:31:02 +0000 (15:31 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 24 Aug 2015 15:31:02 +0000 (08:31 -0700)
PR target/66821
* gcc.target/i386/pr66821.c: New test.

From-SVN: r227133

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr66821.c [new file with mode: 0644]

index 9161ce4b3b7bdc7f70f7641ce5d6cac471987619..0cb80827e3e23bc2c63af10c5b9437d4485d2c13 100644 (file)
@@ -1,3 +1,8 @@
+2015-08-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/66821
+       * gcc.target/i386/pr66821.c: New test.
+
 2015-08-24  H.J. Lu  <hongjiu.lu@intel.com>
 
        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 (file)
index 0000000..d32f03d
--- /dev/null
@@ -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" } } */