[all-commits] [llvm/llvm-project] 3fb0d6: [ValueTracking] add range limits for ctlz
RotateRight via All-commits
all-commits at lists.llvm.org
Fri Oct 23 06:03:57 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 3fb0d6b0d55b52a214a3e5118dda3c7d3422782a
https://github.com/llvm/llvm-project/commit/3fb0d6b0d55b52a214a3e5118dda3c7d3422782a
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2020-10-23 (Fri, 23 Oct 2020)
Changed paths:
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/test/Transforms/InstSimplify/compare.ll
Log Message:
-----------
[ValueTracking] add range limits for ctlz
As discussed in D89952,
instcombine can sometimes find a way to reduce similar patterns,
but it is incomplete.
InstSimplify uses the computeConstantRange() ValueTracking analysis
via simplifyICmpWithConstant(), so we just need to fill in the max
value of ctlz to process any "icmp pred ctlz(X), C" pattern (the
min value is initialized to zero automatically).
Follow-up to D89976.
More information about the All-commits
mailing list