1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2; Check stepvector for scalable vector
3; RUN: opt < %s -passes='print<cost-model>' 2>&1 -disable-output -S -mtriple=riscv64 -mattr=+v | FileCheck %s
4
5define void @stepvector() {
6; CHECK-LABEL: 'stepvector'
7; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zero = call <vscale x 1 x i8> @llvm.experimental.stepvector.nxv1i8()
8; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = call <vscale x 2 x i8> @llvm.experimental.stepvector.nxv2i8()
9; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %2 = call <vscale x 4 x i8> @llvm.experimental.stepvector.nxv4i8()
10; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %3 = call <vscale x 8 x i8> @llvm.experimental.stepvector.nxv8i8()
11; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %4 = call <vscale x 8 x i8> @llvm.experimental.stepvector.nxv8i8()
12; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %5 = call <vscale x 8 x i8> @llvm.experimental.stepvector.nxv8i8()
13; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %6 = call <vscale x 8 x i8> @llvm.experimental.stepvector.nxv8i8()
14; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %7 = call <vscale x 8 x i8> @llvm.experimental.stepvector.nxv8i8()
15; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %8 = call <vscale x 16 x i8> @llvm.experimental.stepvector.nxv16i8()
16; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %9 = call <vscale x 32 x i8> @llvm.experimental.stepvector.nxv32i8()
17; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %10 = call <vscale x 64 x i8> @llvm.experimental.stepvector.nxv64i8()
18; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %11 = call <vscale x 1 x i16> @llvm.experimental.stepvector.nxv1i16()
19; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %12 = call <vscale x 2 x i16> @llvm.experimental.stepvector.nxv2i16()
20; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %13 = call <vscale x 4 x i16> @llvm.experimental.stepvector.nxv4i16()
21; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %14 = call <vscale x 8 x i16> @llvm.experimental.stepvector.nxv8i16()
22; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %15 = call <vscale x 16 x i16> @llvm.experimental.stepvector.nxv16i16()
23; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %16 = call <vscale x 16 x i16> @llvm.experimental.stepvector.nxv16i16()
24; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %17 = call <vscale x 16 x i16> @llvm.experimental.stepvector.nxv16i16()
25; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %18 = call <vscale x 16 x i16> @llvm.experimental.stepvector.nxv16i16()
26; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %19 = call <vscale x 16 x i16> @llvm.experimental.stepvector.nxv16i16()
27; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %20 = call <vscale x 32 x i16> @llvm.experimental.stepvector.nxv32i16()
28; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %21 = call <vscale x 1 x i32> @llvm.experimental.stepvector.nxv1i32()
29; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %22 = call <vscale x 2 x i32> @llvm.experimental.stepvector.nxv2i32()
30; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %23 = call <vscale x 4 x i32> @llvm.experimental.stepvector.nxv4i32()
31; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %24 = call <vscale x 8 x i32> @llvm.experimental.stepvector.nxv8i32()
32; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %25 = call <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
33; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %26 = call <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
34; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %27 = call <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
35; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %28 = call <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
36; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %29 = call <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
37; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %30 = call <vscale x 1 x i64> @llvm.experimental.stepvector.nxv1i64()
38; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %31 = call <vscale x 2 x i64> @llvm.experimental.stepvector.nxv2i64()
39; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %32 = call <vscale x 4 x i64> @llvm.experimental.stepvector.nxv4i64()
40; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %33 = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
41; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %34 = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
42; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %35 = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
43; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %36 = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
44; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %37 = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
45; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %38 = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
46; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %39 = call <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
47; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %40 = call <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
48; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %41 = call <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
49; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %42 = call <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
50; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %43 = call <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
51; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %44 = call <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
52; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
53;
54  %zero = call <vscale x 1 x i8> @llvm.experimental.stepvector.nxv1i8()
55  %1 = call <vscale x 2 x i8> @llvm.experimental.stepvector.nxv2i8()
56  %2 = call <vscale x 4 x i8> @llvm.experimental.stepvector.nxv4i8()
57  %3 = call <vscale x 8 x i8> @llvm.experimental.stepvector.nxv8i8()
58  %4 = call <vscale x 8 x i8> @llvm.experimental.stepvector.nxv8i8()
59  %5 = call <vscale x 8 x i8> @llvm.experimental.stepvector.nxv8i8()
60  %6 = call <vscale x 8 x i8> @llvm.experimental.stepvector.nxv8i8()
61  %7 = call <vscale x 8 x i8> @llvm.experimental.stepvector.nxv8i8()
62  %8 = call <vscale x 16 x i8> @llvm.experimental.stepvector.nxv16i8()
63  %9 = call <vscale x 32 x i8> @llvm.experimental.stepvector.nxv32i8()
64  %10 = call <vscale x 64 x i8> @llvm.experimental.stepvector.nxv64i8()
65  %11 = call <vscale x 1 x i16> @llvm.experimental.stepvector.nxv1i16()
66  %12 = call <vscale x 2 x i16> @llvm.experimental.stepvector.nxv2i16()
67  %13 = call <vscale x 4 x i16> @llvm.experimental.stepvector.nxv4i16()
68  %14 = call <vscale x 8 x i16> @llvm.experimental.stepvector.nxv8i16()
69  %15 = call <vscale x 16 x i16> @llvm.experimental.stepvector.nxv16i16()
70  %16 = call <vscale x 16 x i16> @llvm.experimental.stepvector.nxv16i16()
71  %17 = call <vscale x 16 x i16> @llvm.experimental.stepvector.nxv16i16()
72  %18 = call <vscale x 16 x i16> @llvm.experimental.stepvector.nxv16i16()
73  %19 = call <vscale x 16 x i16> @llvm.experimental.stepvector.nxv16i16()
74  %20 = call <vscale x 32 x i16> @llvm.experimental.stepvector.nxv32i16()
75  %21 = call <vscale x 1 x i32> @llvm.experimental.stepvector.nxv1i32()
76  %22 = call <vscale x 2 x i32> @llvm.experimental.stepvector.nxv2i32()
77  %23 = call <vscale x 4 x i32> @llvm.experimental.stepvector.nxv4i32()
78  %24 = call <vscale x 8 x i32> @llvm.experimental.stepvector.nxv8i32()
79  %25 = call <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
80  %26 = call <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
81  %27 = call <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
82  %28 = call <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
83  %29 = call <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
84  %30 = call <vscale x 1 x i64> @llvm.experimental.stepvector.nxv1i64()
85  %31 = call <vscale x 2 x i64> @llvm.experimental.stepvector.nxv2i64()
86  %32 = call <vscale x 4 x i64> @llvm.experimental.stepvector.nxv4i64()
87  %33 = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
88  %34 = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
89  %35 = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
90  %36 = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
91  %37 = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
92  %38 = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
93  %39 = call <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
94  %40 = call <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
95  %41 = call <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
96  %42 = call <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
97  %43 = call <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
98  %44 = call <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
99  ret void
100}
101
102
103declare <vscale x 1 x i8> @llvm.experimental.stepvector.nxv1i8()
104declare <vscale x 2 x i8> @llvm.experimental.stepvector.nxv2i8()
105declare <vscale x 4 x i8> @llvm.experimental.stepvector.nxv4i8()
106declare <vscale x 8 x i8> @llvm.experimental.stepvector.nxv8i8()
107declare <vscale x 16 x i8> @llvm.experimental.stepvector.nxv16i8()
108declare <vscale x 32 x i8> @llvm.experimental.stepvector.nxv32i8()
109declare <vscale x 64 x i8> @llvm.experimental.stepvector.nxv64i8()
110declare <vscale x 1 x i16> @llvm.experimental.stepvector.nxv1i16()
111declare <vscale x 2 x i16> @llvm.experimental.stepvector.nxv2i16()
112declare <vscale x 4 x i16> @llvm.experimental.stepvector.nxv4i16()
113declare <vscale x 8 x i16> @llvm.experimental.stepvector.nxv8i16()
114declare <vscale x 16 x i16> @llvm.experimental.stepvector.nxv16i16()
115declare <vscale x 32 x i16> @llvm.experimental.stepvector.nxv32i16()
116declare <vscale x 1 x i32> @llvm.experimental.stepvector.nxv1i32()
117declare <vscale x 2 x i32> @llvm.experimental.stepvector.nxv2i32()
118declare <vscale x 4 x i32> @llvm.experimental.stepvector.nxv4i32()
119declare <vscale x 8 x i32> @llvm.experimental.stepvector.nxv8i32()
120declare <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32()
121declare <vscale x 1 x i64> @llvm.experimental.stepvector.nxv1i64()
122declare <vscale x 2 x i64> @llvm.experimental.stepvector.nxv2i64()
123declare <vscale x 4 x i64> @llvm.experimental.stepvector.nxv4i64()
124declare <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
125declare <vscale x 16 x i64> @llvm.experimental.stepvector.nxv16i64()
126