Add two notes for correlated-expression optimizations.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 7 Sep 2011 22:49:26 +0000 (22:49 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 7 Sep 2011 22:49:26 +0000 (22:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139263 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/README.txt

index 4cc95340890d4cf997d9a91192ef435e4aacb2d1..1f69ffb09c0a4a04298f9e84b91acd2b3c06b1ec 100644 (file)
@@ -2348,3 +2348,13 @@ which can do this in a single operation (instruction or libcall).  It is
 probably best to do this in the code generator.
 
 //===---------------------------------------------------------------------===//
+
+unsigned foo(unsigned x, unsigned y) { return (x & y) == 0 || x == 0; }
+should fold to (x & y) == 0.
+
+//===---------------------------------------------------------------------===//
+
+unsigned foo(unsigned x, unsigned y) { return x > y && x != 0; }
+should fold to x > y.
+
+//===---------------------------------------------------------------------===//