[llvm] [ConstantRange] Estimate tighter lower (upper) bounds for masked binary and (or) (PR #120352)
Stephen Senran Zhang via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 18 02:02:51 PST 2024
zsrkmyn wrote:
@antoniofrighetto Aha, initially I want to fix it in ValueTracking as well, but I just found ValueTracking cannot model the case that "there's at least one bit being 1 in some field of a variable, but any bit in the field can be 0", which is the case in #118108. And only ConstantRange is able to do so. That's why I fix it here.
As for the performance, almost all operations of the algorithm are bit manipulation. It should be fast for native int types. But for APInt, sadly, I have no idea. APInt always checks 'isSingleWord()' and branches :-/
https://github.com/llvm/llvm-project/pull/120352
More information about the llvm-commits
mailing list