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.stepvector.i32()
11 ; Reject vectors with non-integer elements
13 define <vscale x 4 x float> @stepvector_float() {
14 ; CHECK: stepvector only supported for vectors of integers with a bitwidth of at least 8
15 %1 = call <vscale x 4 x float> @llvm.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: stepvector only supported for vectors of integers with a bitwidth of at least 8
23 %1 = call <vscale x 16 x i1> @llvm.stepvector.nxv16i1()
24 ret <vscale x 16 x i1> %1
27 declare i32 @llvm.stepvector.i32()
28 declare <vscale x 4 x float> @llvm.stepvector.nxv4f32()
29 declare <vscale x 16 x i1> @llvm.stepvector.nxv16i1()