91 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; Check stepvector for scalable vector3; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -S -mtriple=riscv64 -mattr=+v | FileCheck %s4 5define void @stepvector() {6; CHECK-LABEL: 'stepvector'7; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call <vscale x 1 x i8> @llvm.stepvector.nxv1i8()8; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <vscale x 2 x i8> @llvm.stepvector.nxv2i8()9; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <vscale x 4 x i8> @llvm.stepvector.nxv4i8()10; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <vscale x 8 x i8> @llvm.stepvector.nxv8i8()11; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <vscale x 16 x i8> @llvm.stepvector.nxv16i8()12; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %6 = call <vscale x 32 x i8> @llvm.stepvector.nxv32i8()13; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %7 = call <vscale x 64 x i8> @llvm.stepvector.nxv64i8()14; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %8 = call <vscale x 128 x i8> @llvm.stepvector.nxv128i8()15; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call <vscale x 1 x i16> @llvm.stepvector.nxv1i16()16; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call <vscale x 2 x i16> @llvm.stepvector.nxv2i16()17; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = call <vscale x 4 x i16> @llvm.stepvector.nxv4i16()18; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <vscale x 8 x i16> @llvm.stepvector.nxv8i16()19; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %13 = call <vscale x 16 x i16> @llvm.stepvector.nxv16i16()20; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %14 = call <vscale x 32 x i16> @llvm.stepvector.nxv32i16()21; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %15 = call <vscale x 64 x i16> @llvm.stepvector.nxv64i16()22; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call <vscale x 1 x i32> @llvm.stepvector.nxv1i32()23; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call <vscale x 2 x i32> @llvm.stepvector.nxv2i32()24; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call <vscale x 4 x i32> @llvm.stepvector.nxv4i32()25; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %19 = call <vscale x 8 x i32> @llvm.stepvector.nxv8i32()26; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %20 = call <vscale x 16 x i32> @llvm.stepvector.nxv16i32()27; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %21 = call <vscale x 32 x i32> @llvm.stepvector.nxv32i32()28; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = call <vscale x 1 x i64> @llvm.stepvector.nxv1i64()29; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %23 = call <vscale x 2 x i64> @llvm.stepvector.nxv2i64()30; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %24 = call <vscale x 4 x i64> @llvm.stepvector.nxv4i64()31; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %25 = call <vscale x 8 x i64> @llvm.stepvector.nxv8i64()32; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %26 = call <vscale x 16 x i64> @llvm.stepvector.nxv16i64()33; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void34;35 call <vscale x 1 x i8> @llvm.stepvector.nxv1i8()36 call <vscale x 2 x i8> @llvm.stepvector.nxv2i8()37 call <vscale x 4 x i8> @llvm.stepvector.nxv4i8()38 call <vscale x 8 x i8> @llvm.stepvector.nxv8i8()39 call <vscale x 16 x i8> @llvm.stepvector.nxv16i8()40 call <vscale x 32 x i8> @llvm.stepvector.nxv32i8()41 call <vscale x 64 x i8> @llvm.stepvector.nxv64i8()42 call <vscale x 128 x i8> @llvm.stepvector.nxv128i8()43 call <vscale x 1 x i16> @llvm.stepvector.nxv1i16()44 call <vscale x 2 x i16> @llvm.stepvector.nxv2i16()45 call <vscale x 4 x i16> @llvm.stepvector.nxv4i16()46 call <vscale x 8 x i16> @llvm.stepvector.nxv8i16()47 call <vscale x 16 x i16> @llvm.stepvector.nxv16i16()48 call <vscale x 32 x i16> @llvm.stepvector.nxv32i16()49 call <vscale x 64 x i16> @llvm.stepvector.nxv64i16()50 call <vscale x 1 x i32> @llvm.stepvector.nxv1i32()51 call <vscale x 2 x i32> @llvm.stepvector.nxv2i32()52 call <vscale x 4 x i32> @llvm.stepvector.nxv4i32()53 call <vscale x 8 x i32> @llvm.stepvector.nxv8i32()54 call <vscale x 16 x i32> @llvm.stepvector.nxv16i32()55 call <vscale x 32 x i32> @llvm.stepvector.nxv32i32()56 call <vscale x 1 x i64> @llvm.stepvector.nxv1i64()57 call <vscale x 2 x i64> @llvm.stepvector.nxv2i64()58 call <vscale x 4 x i64> @llvm.stepvector.nxv4i64()59 call <vscale x 8 x i64> @llvm.stepvector.nxv8i64()60 call <vscale x 16 x i64> @llvm.stepvector.nxv16i64()61 ret void62}63 64 65declare <vscale x 1 x i8> @llvm.stepvector.nxv1i8()66declare <vscale x 2 x i8> @llvm.stepvector.nxv2i8()67declare <vscale x 4 x i8> @llvm.stepvector.nxv4i8()68declare <vscale x 8 x i8> @llvm.stepvector.nxv8i8()69declare <vscale x 16 x i8> @llvm.stepvector.nxv16i8()70declare <vscale x 32 x i8> @llvm.stepvector.nxv32i8()71declare <vscale x 64 x i8> @llvm.stepvector.nxv64i8()72declare <vscale x 128 x i8> @llvm.stepvector.nxv128i8()73declare <vscale x 1 x i16> @llvm.stepvector.nxv1i16()74declare <vscale x 2 x i16> @llvm.stepvector.nxv2i16()75declare <vscale x 4 x i16> @llvm.stepvector.nxv4i16()76declare <vscale x 8 x i16> @llvm.stepvector.nxv8i16()77declare <vscale x 16 x i16> @llvm.stepvector.nxv16i16()78declare <vscale x 32 x i16> @llvm.stepvector.nxv32i16()79declare <vscale x 64 x i16> @llvm.stepvector.nxv64i16()80declare <vscale x 1 x i32> @llvm.stepvector.nxv1i32()81declare <vscale x 2 x i32> @llvm.stepvector.nxv2i32()82declare <vscale x 4 x i32> @llvm.stepvector.nxv4i32()83declare <vscale x 8 x i32> @llvm.stepvector.nxv8i32()84declare <vscale x 16 x i32> @llvm.stepvector.nxv16i32()85declare <vscale x 32 x i32> @llvm.stepvector.nxv32i32()86declare <vscale x 1 x i64> @llvm.stepvector.nxv1i64()87declare <vscale x 2 x i64> @llvm.stepvector.nxv2i64()88declare <vscale x 4 x i64> @llvm.stepvector.nxv4i64()89declare <vscale x 8 x i64> @llvm.stepvector.nxv8i64()90declare <vscale x 16 x i64> @llvm.stepvector.nxv16i64()91