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. llvm-svn: 147255
Showing
- llvm/lib/Analysis/ValueTracking.cpp 8 additions, 1 deletionllvm/lib/Analysis/ValueTracking.cpp
- llvm/test/Transforms/InstCombine/intrinsics.ll 3 additions, 3 deletionsllvm/test/Transforms/InstCombine/intrinsics.ll
- llvm/test/Transforms/InstCombine/sub-xor.ll 13 additions, 0 deletionsllvm/test/Transforms/InstCombine/sub-xor.ll
Loading
Please register or sign in to comment