Add a microoptimization note.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 23 Jun 2012 15:19:31 +0000 (15:19 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 23 Jun 2012 15:19:31 +0000 (15:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159082 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/README.txt

index 093255e6af2d0314e97d83092624b4edbb48d6d5..cbfa4cf35ba2f35ebf50ea79883ce7ad403fc5c7 100644 (file)
@@ -964,6 +964,12 @@ optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
 
 //===---------------------------------------------------------------------===//
 
+unsigned f(unsigned x) { return ((x & 7) + 1) & 15; }
+The & 15 part should be optimized away, it doesn't change the result. Currently
+not optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
+
+//===---------------------------------------------------------------------===//
+
 This was noticed in the entryblock for grokdeclarator in 403.gcc:
 
         %tmp = icmp eq i32 %decl_context, 4