[PATCH] D32582: [InstCombine] WIP Add range metadata to cttz/ctlz intrinsic calls based on known bits

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 08:27:01 PDT 2017


craig.topper added a comment.

I believe there is code in our compare handling that looks at range metadata. Compares also look at known bits.

The problem is that when converting the known bits from the input into known bits for the output it's very difficult to set any known one bits.

Let's say for cttz all we know from known bits that there is at least one trailing zero, but there could be all trailing zeros. So we can't set any known one bits because the binary encodings for every value in range of possible values for the count have no bits in common,


https://reviews.llvm.org/D32582





More information about the llvm-commits mailing list