Add a few missed xforms from GCC PR14753
authorChris Lattner <sabre@nondot.org>
Wed, 16 Feb 2011 19:16:34 +0000 (19:16 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 16 Feb 2011 19:16:34 +0000 (19:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125681 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/README.txt

index 5aa29782afde9ec7d9378f6d98539b4a5553053d..c6f384cd6eac0692e5e7a4e9f06dce5c807e9f50 100644 (file)
@@ -2218,3 +2218,32 @@ llc time when it gets inlined, because we can use smaller transfers.  This also
 avoids partial register stalls in some important cases.
 
 //===---------------------------------------------------------------------===//
+
+Some missed instcombine xforms (from GCC PR14753):
+
+void bar (void);
+
+void mask_gt (unsigned int a) {
+/* This is equivalent to a > 15.  */
+if ((a & ~7) > 8)
+bar();
+}
+
+void neg_eq_cst(unsigned int a) {
+if (-a == 123)
+bar();
+}
+
+void minus_cst(unsigned int a) {
+if (20 - a == 5)
+bar();
+}
+
+void rotate_cst (unsigned a) {
+a = (a << 10) | (a >> 22);
+if (a == 123)
+bar ();
+}
+
+//===---------------------------------------------------------------------===//
+