1; RUN: opt -passes='print<cost-model>' 2>&1 -disable-output -mtriple=aarch64--linux-gnu -mattr=+sve < %s | FileCheck %s 2 3; Check icmp for legal integer vectors. 4define 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() 14 ret void 15} 16 17; Check icmp for an illegal integer vector. 18define 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() 24 ret void 25} 26 27 28declare <vscale x 2 x i64> @llvm.experimental.stepvector.nxv2i64() 29declare <vscale x 4 x i32> @llvm.experimental.stepvector.nxv4i32() 30declare <vscale x 8 x i16> @llvm.experimental.stepvector.nxv8i16() 31declare <vscale x 16 x i8> @llvm.experimental.stepvector.nxv16i8() 32 33declare <vscale x 4 x i64> @llvm.experimental.stepvector.nxv4i64() 34declare <vscale x 16 x i32> @llvm.experimental.stepvector.nxv16i32() 35