HomePhabricator

[ValueTracking] add range limits for cttz

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

Description

[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.

Details

Committed
spatelOct 23 2020, 5:43 AM
Parents
rG3fb0d6b0d55b: [ValueTracking] add range limits for ctlz
Branches
Unknown
Tags
Unknown