[ValueTracking] Determine assume KnownBits using ConstantRange
For non-equality icmps, we don't do any KnownBits-specific reasoning, and just use the known bits as a constraint on the range. We can generalize this for all predicates by round-tripping through ConstantRange and using makeAllowedICmpRegion(). The minor improvement in zext-or-icmp is because we assume that a value is ult [0,1], which means it must be zero.
Loading
Please sign in to comment