The loop vectorizer uses getRegisterClassForType to determine the
register class occupied by a given an llvm::Type* for the purposes of
register pressure estimation, which in turn feeds into the choice of the
a maximum VF to use.
As part of this, the loop vectorizer has a heuristic
isScalarAfterVectorization, which `getRegisterClassForType(bool
Vector, Type *Ty)` effectively receives as its 'Vector' parameter. The
default implementation of getRegisterClassForType ignores the Type
parameter, just returning a 'VectorRC' if Vector is True.
However, some large vector types (e.g. v128i1) are represented with a
number of scalar registers. This is known by TLI->getRegisterType, so
add a TTI interface getRegMVTForType and propagate this information
up to the newly implemented getRegisterClassForType.
Can this just use the existing TLI->getTypeLegalizationCost call to get the MVT?