The computeKnownBits functions do not currently handle known bits of scalable vectors, as the meaning of DemandedElts is unclear for a vector that is scalable. This changes that so that the majority of knownBits is run, with the check for scalable vectors being pushed into the individual cases that a not trivially lane-wise independent. The DemandedElts size is set to getVectorMinNumElements and asserted to be all-ones, although this patch doesn't make a strong opinion as to what that means, exactly. Nothing currently makes use of it in a way that varies between elements.
In order to keep the tests working this also:
- Adds known bits for ISD::SPLAT_VECTOR, which is the same bits as the input element (possibly truncated).
- Adds some simple known bits for ISD::STEP_VECTOR, which for power-two increments we know lower bit zeroes.
- The patterns for INDEX were made to work with adds or add-like-ors, to keep them working as intended.