[ValueTracking] Support vscale in computeConstantRange()
authorNikita Popov <npopov@redhat.com>
Thu, 16 Mar 2023 11:42:59 +0000 (12:42 +0100)
committerNikita Popov <npopov@redhat.com>
Fri, 17 Mar 2023 09:03:24 +0000 (10:03 +0100)
commit402dfa389e136c75ac7f341ea85ff4c854aa0e93
tree3c1df5ea5747d2613d30b07f3bcb081671fa2e9c
parenta8f6b5763e89cfeec94d3fcf0f6b70f96b293f7d
[ValueTracking] Support vscale in computeConstantRange()

Add support for vscale in computeConstantRange(), based on
vscale_range attributes. This allows simplifying based on the
precise range, rather than a KnownBits approximation (which will
be off by a factor of two for the usual case of a power of two
upper bound).

Differential Revision: https://reviews.llvm.org/D146217
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/InstCombine/icmp-vscale.ll