forked from OSchip/llvm-project
ed6acde8cf
This commit suppresses turning loops like this into "(bitwidth - ctlz(input))". unsigned foo(unsigned input) { unsigned num = 0; do { ++num; input >>= 1; } while (input != 0); return num; } The loop version returns a value of 1 for both an input of 0 and an input of 1. Converting to a naive ctlz does not preserve that. Theoretically we could do better if we checked isKnownNonZero or we could insert a select to handle the divergence. But until we have motivating cases for that, this is the easiest solution. llvm-svn: 336864 |
||
---|---|---|
.. | ||
AMDGPU | ||
ARM | ||
X86 | ||
basic-address-space.ll | ||
basic.ll | ||
crash.ll | ||
ctpop-multiple-users-crash.ll | ||
debug-line.ll | ||
int_sideeffect.ll | ||
lir-heurs-multi-block-loop.ll | ||
memset_noidiom.ll | ||
non-canonical-loop.ll | ||
non-integral-pointers.ll | ||
nontemporal_store.ll | ||
pr28196.ll | ||
pr33114.ll | ||
scev-invalidation.ll | ||
struct-custom-dl.ll | ||
struct.ll | ||
struct_pattern.ll | ||
unordered-atomic-memcpy-noarch.ll | ||
unroll-custom-dl.ll | ||
unroll.ll | ||
unsafe.ll | ||
unwind.ll |