diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-21 01:33:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-21 01:33:38 +0000 |
commit | 477a98824aaa173e8b4c327a82426de5c1197923 (patch) | |
tree | 71ac5d0e2bfea4a662bdf09660fe3376fa97e6e9 /lib/Target/README.txt | |
parent | ad48a4fc321adc58cd2843da64b2e206441c7e96 (diff) | |
download | llvm-477a98824aaa173e8b4c327a82426de5c1197923.tar.gz llvm-477a98824aaa173e8b4c327a82426de5c1197923.tar.bz2 llvm-477a98824aaa173e8b4c327a82426de5c1197923.tar.xz |
add an idiom that loop idiom could theoretically catch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/README.txt')
-rw-r--r-- | lib/Target/README.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt index 4e14fbbb09..bda764deff 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -287,6 +287,16 @@ unsigned int popcount(unsigned int input) { return count; } +This should be recognized as CLZ: rdar://8459039 + +unsigned clz_a(unsigned a) { + int i; + for (i=0;i<32;i++) + if (a & (1<<(31-i))) + return i; + return 32; +} + This sort of thing should be added to the loop idiom pass. //===---------------------------------------------------------------------===// |