[LVI] Use !range metadata for supported intrinsics
authorNikita Popov <npopov@redhat.com>
Thu, 26 Jan 2023 14:09:48 +0000 (15:09 +0100)
committerNikita Popov <npopov@redhat.com>
Thu, 26 Jan 2023 14:09:48 +0000 (15:09 +0100)
commit2e9bc1b8614c9422573cf2f4728525787b0cb0cb
tree4f70a884380ea78f05bbc2aec42e3628897e0f64
parent1f88048f2d62d982885efa938f43a643ac4565a5
[LVI] Use !range metadata for supported intrinsics

Even if the intrinsic is supported by ConstantRange, we should
still make use of !range metadata. This doesn't matter much now,
but is important if we want to support ctlz style intrinsics,
which always have KnownBits-based !range metadata attached, which
might be better than what we can compute using ranges.
llvm/lib/Analysis/LazyValueInfo.cpp
llvm/test/Transforms/CorrelatedValuePropagation/range.ll