aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-30 21:29:15 +0000
committerChris Lattner <sabre@nondot.org>2006-05-30 21:29:15 +0000
commit9e18ef52625dbcd33e0f415cea8cead2966a9f9b (patch)
tree609e0b2b78f27392e845ac428067ef26a096371a
parent7b053509063f21aa0bf6ffc82b274e8cf6b0e182 (diff)
Add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28572 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/README.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt
index 807768002b..650eabf2d4 100644
--- a/lib/Target/README.txt
+++ b/lib/Target/README.txt
@@ -251,3 +251,22 @@ void %test(uint* %P) {
ret void
}
+//===---------------------------------------------------------------------===//
+
+dag/inst combine "clz(x)>>5 -> x==0" for 32-bit x.
+
+Compile:
+
+int bar(int x)
+{
+ int t = __builtin_clz(x);
+ return -(t>>5);
+}
+
+to:
+
+_bar: addic r3,r3,-1
+ subfe r3,r3,r3
+ blr
+
+