This patch prevents the llvm.masked.gather and llvm.masked.scatter intrinsics to be scalarized when invoked on scalable vectors.
The change in Function.cpp is needed to prevent the warning that is raised when getNumElements is used in place of getElementCount on VectorType instances. The tests guards for regressions on this change.
The tests makes sure that calls to llvm.masked.[gather|scatter] are still scalarized when:
- the intrinsics are operating on fixed size vectors, and
- the compiler is not targeting fixed length SVE code generation.
nit: s/passthro/passthru