The langref (llvm/docs/LangRef.rst) specifies the following for the
llvm.experimental.vector.insert intrinsic:
Elements ``idx`` through (``idx`` + num_elements(``subvec``) - 1) must be valid ``vec`` indices. If this condition cannot be determined statically but is false at runtime, then the result vector is undefined.
and the following for the llvm.experimental.vector.extract intrinsic:
Elements ``idx`` through (``idx`` + num_elements(result_type) - 1) must be valid vector indices. If this condition cannot be determined statically but is false at runtime, then the result vector is undefined.
For the non-mixed cases (e.g. inserting/extracting a scalable into/from
another scalable, or inserting/extracting a fixed into/from another
fixed), it is possible to statically check whether or not the above
conditions are met.
This was previously missing from the verifier, and if the conditions
were found to be false, the result of the insertion/extraction would be
replaced with an undef.
This patch adds more checks to the verifier to ensure that these
constraints are not violated.
Depends on: D102842
Nit: This feels like half a sentence, I would expect a , then ... after this.