HomePhabricator

[ValueTracking] add range limits for ctpop

Authored by spatel on Oct 23 2020, 5:16 AM.

Description

[ValueTracking] add range limits for ctpop

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 ctpop to process any "icmp pred ctpop(X), C" pattern (the
min value is initialized to zero automatically).

Differential Revision: https://reviews.llvm.org/D89976

Details

Committed
spatelOct 23 2020, 5:17 AM
Differential Revision
D89976: [ValueTracking] add range limits for ctpop
Parents
rG448f25c86b79: [mlir] Expose affine expression to C API
Branches
Unknown
Tags
Unknown