[Matrix] Add asserts for mismatched element types.
authorBraedy Kuzma <braedy@ualberta.ca>
Thu, 23 Jul 2020 14:57:22 +0000 (15:57 +0100)
committerFlorian Hahn <flo@fhahn.com>
Thu, 23 Jul 2020 15:02:48 +0000 (16:02 +0100)
commit24e41a34fe2218b53241c9627192b70c56f3059c
tree52487bf9973ee6cd81b0364e44bf65de103233c2
parent896679733d7461b1360644848cb5f3fcbdd5294a
[Matrix] Add asserts for mismatched element types.

This patch clarifies the failing point of having input or output vectors
of differing types. Before, lowering would fail elsewhere (e.g. in
`fmul` creation) which may have been not immediately clear.

As a side effect, the `getElementType` and `getVectoryTy` functions
required the `const` qualifier to be added.

Reviewers: fhahn

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D84374
llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp