forked from OSchip/llvm-project
![]() This adds support for loops like unsigned clz(unsigned x) { unsigned w = sizeof (x) * CHAR_BIT; while (x) { w--; x >>= 1; } return w; } and unsigned clz(unsigned x) { unsigned w = sizeof (x) * CHAR_BIT - 1; while (x >>= 1) { w--; } return w; } To support these we look for add x, -1 as well as add x, 1 that we already matched. If the value was -1 we need to subtract from the initial counter value instead of adding to it. Fixes PR48404. Differential Revision: https://reviews.llvm.org/D92745 |
||
---|---|---|
.. | ||
AMDGPU | ||
ARM | ||
X86 | ||
basic-address-space.ll | ||
basic.ll | ||
crash.ll | ||
ctpop-multiple-users-crash.ll | ||
dbginfo-cost.ll | ||
debug-line.ll | ||
disable-options.ll | ||
expander-do-not-delete-reused-values.ll | ||
int_sideeffect.ll | ||
lir-heurs-multi-block-loop.ll | ||
memcpy-debugify-remarks.ll | ||
memcpy-vectors.ll | ||
memset-debugify-remarks.ll | ||
memset_noidiom.ll | ||
non-canonical-loop.ll | ||
non-integral-pointers.ll | ||
nontemporal_store.ll | ||
phi-insertion.ll | ||
pr28196.ll | ||
pr33114.ll | ||
reuse-cast.ll | ||
scev-invalidation.ll | ||
scev-invalidation_topmostloop.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 |