ComputeMaskedBits: Make knownzero computation more aggressive for ctlz with undef...
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 24 Dec 2011 17:31:46 +0000 (17:31 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 24 Dec 2011 17:31:46 +0000 (17:31 +0000)
commit009da05e750b7bac7e1902fcdc85394de4ea63b3
tree87dc3949e2f937b584c060248a4fcdf271f6427b
parent1fdfae05b0a4356d1ed0633bf3d6cdc6eba2e173
ComputeMaskedBits: Make knownzero computation more aggressive for ctlz with undef zero.

unsigned foo(unsigned x) { return 31 - __builtin_clz(x); }
now compiles into a single "bsrl" instruction on x86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147255 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
test/Transforms/InstCombine/intrinsics.ll
test/Transforms/InstCombine/sub-xor.ll