1 ; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s
3 ; Reject stepvector intrinsics that return a scalar
5 define i32 @stepvector_i32() {
6 ; CHECK: Intrinsic has incorrect return type!
7 %1 = call i32 @llvm.experimental.stepvector.i32()
11 ; Reject vectors with non-integer elements
13 define <vscale x 4 x float> @stepvector_float() {
14 ; CHECK: experimental_stepvector only supported for vectors of integers with a bitwidth of at least 8
15 %1 = call <vscale x 4 x float> @llvm.experimental.stepvector.nxv4f32()
16 ret <vscale x 4 x float> %1
19 ; Reject vectors of integers less than 8 bits in width
21 define <vscale x 16 x i1> @stepvector_i1() {
22 ; CHECK: experimental_stepvector only supported for vectors of integers with a bitwidth of at least 8
23 %1 = call <vscale x 16 x i1> @llvm.experimental.stepvector.nxv16i1()
24 ret <vscale x 16 x i1> %1
27 declare i32 @llvm.experimental.stepvector.i32()
28 declare <vscale x 4 x float> @llvm.experimental.stepvector.nxv4f32()
29 declare <vscale x 16 x i1> @llvm.experimental.stepvector.nxv16i1()