1 ; RUN: opt -cost-model -analyze -mtriple=aarch64--linux-gnu -mattr=+sve < %s | FileCheck %s
3 ; Check icmp for legal integer vectors.
4 define void @stepvector_legal_int() {
5 ; CHECK-LABEL: 'stepvector_legal_int'
6 ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %1 = call <vscale x 2 x i64> @llvm.experimental.stepvector.nxv2i64()
7 ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <vscale x 4 x i32> @llvm.experimental.stepvector.nxv4i32()
8 ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <vscale x 8 x i16> @llvm.experimental.stepvector.nxv8i16()
9 ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <vscale x 16 x i8> @llvm.experimental.stepvector.nxv16i8()
10 %1 = call <vscale x 2 x i64> @llvm.experimental.stepvector.nxv2i64()
11 %2 = call <vscale x 4 x i32> @llvm.experimental.stepvector.nxv4i32()
12 %3 = call <vscale x 8 x i16> @llvm.experimental.stepvector.nxv8i16()
13 %4 = call <vscale x 16 x i8> @llvm.experimental.stepvector.nxv16i8()
17 ; Check icmp for an illegal integer vector.
18 define void @stepvector_illegal_int() {
19 ; CHECK-LABEL: 'stepvector_illegal_int'
20 ; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %1 = call <vscale x 4 x i64> @llvm.experimental.stepvector.nxv4i64()
21 ; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %2 = call <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
22 %1 = call <vscale x 4 x i64> @llvm.experimental.stepvector.nxv4i64()
23 %2 = call <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
28 declare <vscale x 2 x i64> @llvm.experimental.stepvector.nxv2i64()
29 declare <vscale x 4 x i32> @llvm.experimental.stepvector.nxv4i32()
30 declare <vscale x 8 x i16> @llvm.experimental.stepvector.nxv8i16()
31 declare <vscale x 16 x i8> @llvm.experimental.stepvector.nxv16i8()
33 declare <vscale x 4 x i64> @llvm.experimental.stepvector.nxv4i64()
34 declare <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()