summaryrefslogtreecommitdiff
path: root/lib/Target/README.txt
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-09-07 22:49:26 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-09-07 22:49:26 +0000
commit3e328ecbd869e0e5cd309ddd793da6857e3b4431 (patch)
tree4a8014219348f82fb3d5dcd1f61705b959534661 /lib/Target/README.txt
parent0472e040cba6d15ff3810685c3bd1bbdade3e568 (diff)
downloadllvm-3e328ecbd869e0e5cd309ddd793da6857e3b4431.tar.gz
llvm-3e328ecbd869e0e5cd309ddd793da6857e3b4431.tar.bz2
llvm-3e328ecbd869e0e5cd309ddd793da6857e3b4431.tar.xz
Add two notes for correlated-expression optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/README.txt')
-rw-r--r--lib/Target/README.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt
index 4cc9534089..1f69ffb09c 100644
--- a/lib/Target/README.txt
+++ b/lib/Target/README.txt
@@ -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.
+
+//===---------------------------------------------------------------------===//