diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-23 18:49:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-23 18:49:30 +0000 |
commit | 818ff34bc0841edda10951b7b043076b6e7159ef (patch) | |
tree | c98b6b028a742d8c58e9b2cf66a33ce49ae1b35e /lib/Target | |
parent | a9cf5b3cc9082acee5b6e30e989a667fed286b05 (diff) | |
download | llvm-818ff34bc0841edda10951b7b043076b6e7159ef.tar.gz llvm-818ff34bc0841edda10951b7b043076b6e7159ef.tar.bz2 llvm-818ff34bc0841edda10951b7b043076b6e7159ef.tar.xz |
implement a simple instcombine xform that has been in the
readme forever.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/README.txt | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt index 6c6290a70a..c68ae76a25 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -237,24 +237,6 @@ define void @test(i32* %P) { //===---------------------------------------------------------------------===// -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 - -//===---------------------------------------------------------------------===// - quantum_sigma_x in 462.libquantum contains the following loop: for(i=0; i<reg->size; i++) @@ -294,6 +276,8 @@ unsigned long reverse(unsigned v) { //===---------------------------------------------------------------------===// +[LOOP RECOGNITION] + These idioms should be recognized as popcount (see PR1488): unsigned countbits_slow(unsigned v) { |