mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-21 03:37:47 +00:00
Add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28572 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7b05350906
commit
9e18ef5262
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user