diff --git a/llvm/test/Verifier/extract-vector-mismatched-element-types.ll b/llvm/test/Verifier/extract-vector-mismatched-element-types.ll deleted file mode 100644 --- a/llvm/test/Verifier/extract-vector-mismatched-element-types.ll +++ /dev/null @@ -1,9 +0,0 @@ -; RUN: not opt -verify -S < %s 2>&1 >/dev/null | FileCheck %s - -; CHECK: experimental_vector_extract result must have the same element type as the input vector. -define <16 x i16> @invalid_mismatched_element_types( %vec) nounwind { - %retval = call <16 x i16> @llvm.experimental.vector.extract.v16i16.nxv16i8( %vec, i64 0) - ret <16 x i16> %retval -} - -declare <16 x i16> @llvm.experimental.vector.extract.v16i16.nxv16i8(, i64) diff --git a/llvm/test/Verifier/insert-extract-intrinsics-invalid.ll b/llvm/test/Verifier/insert-extract-intrinsics-invalid.ll --- a/llvm/test/Verifier/insert-extract-intrinsics-invalid.ll +++ b/llvm/test/Verifier/insert-extract-intrinsics-invalid.ll @@ -62,6 +62,22 @@ ret %1 } +; +; Test that extractions/insertion elements type are validated. +; + +; CHECK: experimental_vector_extract result must have the same element type as the input vector. +define <16 x i16> @invalid_mismatched_element_types( %vec) nounwind { + %retval = call <16 x i16> @llvm.experimental.vector.extract.v16i16.nxv16i8( %vec, i64 0) + ret <16 x i16> %retval +} + +; CHECK: experimental_vector_insert parameters must have the same element type. +define @invalid_mismatched_element_types( %vec, <4 x i16> %subvec) nounwind { + %retval = call @llvm.experimental.vector.insert.nxv16i8.v4i16( %vec, <4 x i16> %subvec, i64 0) + ret %retval +} + declare @llvm.experimental.vector.extract.nxv8i32.nxv3i32(, i64) declare @llvm.experimental.vector.insert.nxv8i32.nxv3i32(, , i64) declare @llvm.experimental.vector.insert.nxv8i32.v3i32(, <3 x i32>, i64) @@ -70,3 +86,5 @@ declare <4 x i32> @llvm.experimental.vector.extract.v4i32.v8i32(<8 x i32>, i64) declare <8 x i32> @llvm.experimental.vector.insert.v8i32.v3i32(<8 x i32>, <3 x i32>, i64) declare <8 x i32> @llvm.experimental.vector.insert.v8i32.v4i32(<8 x i32>, <4 x i32>, i64) +declare <16 x i16> @llvm.experimental.vector.extract.v16i16.nxv16i8(, i64) +declare @llvm.experimental.vector.insert.nxv16i8.v4i16(, <4 x i16>, i64) diff --git a/llvm/test/Verifier/insert-vector-mismatched-element-types.ll b/llvm/test/Verifier/insert-vector-mismatched-element-types.ll deleted file mode 100644 --- a/llvm/test/Verifier/insert-vector-mismatched-element-types.ll +++ /dev/null @@ -1,9 +0,0 @@ -; RUN: not opt -verify -S < %s 2>&1 >/dev/null | FileCheck %s - -; CHECK: experimental_vector_insert parameters must have the same element type. -define @invalid_mismatched_element_types( %vec, <4 x i16> %subvec) nounwind { - %retval = call @llvm.experimental.vector.insert.nxv16i8.v4i16( %vec, <4 x i16> %subvec, i64 0) - ret %retval -} - -declare @llvm.experimental.vector.insert.nxv16i8.v4i16(, <4 x i16>, i64)