re PR tree-optimization/15256 ([tree-ssa] Optimize manual bitfield manipilation.)
authorRichard Biener <rguenther@suse.de>
Wed, 29 Jun 2016 13:48:39 +0000 (13:48 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 29 Jun 2016 13:48:39 +0000 (13:48 +0000)
2016-06-29  Richard Biener  <rguenther@suse.de>

PR middle-end/15256
* gcc.dg/tree-ssa/forwprop-34.c: New testcase.

From-SVN: r237852

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/forwprop-34.c [new file with mode: 0644]

index c8f96a9873224e9e10b8d9662f87c94e3fdd40ce..0c931e03822fe43f915b886bc95fbb0fb10f6d26 100644 (file)
@@ -1,3 +1,8 @@
+2016-06-29  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/15256
+       * gcc.dg/tree-ssa/forwprop-34.c: New testcase.
+
 2016-06-29  Matthew Wahab  <matthew.wahab@arm.com>
 
        * gcc.target/arm/aapcs/neon-vect10.c: Require
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-34.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-34.c
new file mode 100644 (file)
index 0000000..9aadce6
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-cddce1" } */
+
+unsigned int
+foo (unsigned int eax)
+{
+  unsigned int edx = eax & 1;
+  edx ^= 1;
+  eax &= -2;
+  eax |= edx;
+  return eax;
+}
+
+/* { dg-final { scan-tree-dump-times " = " 1 "cddce1" } } */
+/* { dg-final { scan-tree-dump " = eax_\[0-9\]+\\(D\\) \\^ 1;" "cddce1" } } */