[all-commits] [llvm/llvm-project] c72198: [ValueTracking] add range limits for cttz
RotateRight via All-commits
all-commits at lists.llvm.org
Fri Oct 23 06:04:02 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c72198079df60e73948fe4744b1c0ef7231803fd
https://github.com/llvm/llvm-project/commit/c72198079df60e73948fe4744b1c0ef7231803fd
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/InstCombine/ctpop-cttz.ll
M llvm/test/Transforms/InstSimplify/compare.ll
Log Message:
-----------
[ValueTracking] add range limits for cttz
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 cttz to process any "icmp pred cttz(X), C" pattern (the
min value is initialized to zero automatically).
https://alive2.llvm.org/ce/z/Z_SLWZ
Follow-up to D89976.
More information about the All-commits
mailing list