[ConstantRange] Handle `Intrinsic::ctlz`
authorAntonio Frighetto <me@antoniofrighetto.com>
Fri, 17 Feb 2023 08:50:49 +0000 (09:50 +0100)
committerNikita Popov <npopov@redhat.com>
Fri, 17 Feb 2023 08:57:35 +0000 (09:57 +0100)
commit65898e526060ae0f02de556c63dd3ce599d08c52
tree2f227c488c9a7313ad009513cd760c4f8b310765
parenta1e80c69223a091e6f0fc84df33a464604c8bbc1
[ConstantRange] Handle `Intrinsic::ctlz`

Introduce ConstantRange support for ctlz intrinsic, including
exhaustive testing. Among other things, LVI may now be able to
propagate information about cltz constant ranges lattice values.

Differential Revision: https://reviews.llvm.org/D142234
llvm/include/llvm/IR/ConstantRange.h
llvm/lib/IR/ConstantRange.cpp
llvm/test/Transforms/CorrelatedValuePropagation/range.ll
llvm/unittests/IR/ConstantRangeTest.cpp