[ValueTracking] Clarify TypeSize comparisons
authorCullen Rhodes <cullen.rhodes@arm.com>
Tue, 13 Oct 2020 12:26:47 +0000 (12:26 +0000)
committerCullen Rhodes <cullen.rhodes@arm.com>
Fri, 16 Oct 2020 10:31:12 +0000 (10:31 +0000)
commitfbd62fe60fb2281ca33da35dc25ca3c87ec0bb51
treef38165ac834610accfde40c8081d7840b37e6c08
parent1cf347e48b588ea277cc550b3ac57ecfa540618c
[ValueTracking] Clarify TypeSize comparisons

TypeSize comparisons using overloaded operators should be replaced by
the new isKnownXY comparators when the operands can be fixed-length or
scalable vectors.

In ValueTracking there are several uses of the overloaded operators in
`isKnownNonZero` and `ComputeMultiple`. In the former we already bail
out on scalable vectors since we currently have no way to represent
DemandedElts, and the latter is operating on scalar integers, so we can
assume fixed-size in both instances.

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D89387
llvm/lib/Analysis/ValueTracking.cpp