diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp --- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp @@ -401,7 +401,9 @@ case Intrinsic::smin: case Intrinsic::smax: { static const auto ValidMinMaxTys = {MVT::v8i8, MVT::v16i8, MVT::v4i16, - MVT::v8i16, MVT::v2i32, MVT::v4i32}; + MVT::v8i16, MVT::v2i32, MVT::v4i32, + MVT::nxv16i8, MVT::nxv8i16, MVT::nxv4i32, + MVT::nxv2i64}; auto LT = getTypeLegalizationCost(RetTy); // v2i64 types get converted to cmp+bif hence the cost of 2 if (LT.second == MVT::v2i64) diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll b/llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll --- a/llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll +++ b/llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll @@ -44,13 +44,13 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %xor_nxv4i32 = call i32 @llvm.vector.reduce.xor.nxv4i32( %v0) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %xor_nxv4i64 = call i64 @llvm.vector.reduce.xor.nxv4i64( %v1) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %umin_nxv4i32 = call i32 @llvm.vector.reduce.umin.nxv4i32( %v0) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %umin_nxv4i64 = call i64 @llvm.vector.reduce.umin.nxv4i64( %v1) +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %umin_nxv4i64 = call i64 @llvm.vector.reduce.umin.nxv4i64( %v1) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %smin_nxv4i32 = call i32 @llvm.vector.reduce.smin.nxv4i32( %v0) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %smin_nxv4i64 = call i64 @llvm.vector.reduce.smin.nxv4i64( %v1) +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %smin_nxv4i64 = call i64 @llvm.vector.reduce.smin.nxv4i64( %v1) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %umax_nxv4i32 = call i32 @llvm.vector.reduce.umax.nxv4i32( %v0) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %umax_nxv4i64 = call i64 @llvm.vector.reduce.umax.nxv4i64( %v1) +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %umax_nxv4i64 = call i64 @llvm.vector.reduce.umax.nxv4i64( %v1) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %smax_nxv4i32 = call i32 @llvm.vector.reduce.smax.nxv4i32( %v0) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %smax_nxv4i64 = call i64 @llvm.vector.reduce.smax.nxv4i64( %v1) +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %smax_nxv4i64 = call i64 @llvm.vector.reduce.smax.nxv4i64( %v1) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %fadd_nxv4f32 = call fast float @llvm.vector.reduce.fadd.nxv4f32(float 0.000000e+00, %v2) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %fadd_nxv4f64 = call fast double @llvm.vector.reduce.fadd.nxv4f64(double 0.000000e+00, %v3) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %fmin_nxv4f32 = call fast float @llvm.vector.reduce.fmin.nxv4f32( %v2) @@ -71,13 +71,13 @@ ; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %xor_nxv4i32 = call i32 @llvm.vector.reduce.xor.nxv4i32( %v0) ; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %xor_nxv4i64 = call i64 @llvm.vector.reduce.xor.nxv4i64( %v1) ; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %umin_nxv4i32 = call i32 @llvm.vector.reduce.umin.nxv4i32( %v0) -; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %umin_nxv4i64 = call i64 @llvm.vector.reduce.umin.nxv4i64( %v1) +; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %umin_nxv4i64 = call i64 @llvm.vector.reduce.umin.nxv4i64( %v1) ; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %smin_nxv4i32 = call i32 @llvm.vector.reduce.smin.nxv4i32( %v0) -; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %smin_nxv4i64 = call i64 @llvm.vector.reduce.smin.nxv4i64( %v1) +; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %smin_nxv4i64 = call i64 @llvm.vector.reduce.smin.nxv4i64( %v1) ; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %umax_nxv4i32 = call i32 @llvm.vector.reduce.umax.nxv4i32( %v0) -; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %umax_nxv4i64 = call i64 @llvm.vector.reduce.umax.nxv4i64( %v1) +; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %umax_nxv4i64 = call i64 @llvm.vector.reduce.umax.nxv4i64( %v1) ; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %smax_nxv4i32 = call i32 @llvm.vector.reduce.smax.nxv4i32( %v0) -; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %smax_nxv4i64 = call i64 @llvm.vector.reduce.smax.nxv4i64( %v1) +; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %smax_nxv4i64 = call i64 @llvm.vector.reduce.smax.nxv4i64( %v1) ; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %fadd_nxv4f32 = call fast float @llvm.vector.reduce.fadd.nxv4f32(float 0.000000e+00, %v2) ; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %fadd_nxv4f64 = call fast double @llvm.vector.reduce.fadd.nxv4f64(double 0.000000e+00, %v3) ; TYPE_BASED_ONLY-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %fmin_nxv4f32 = call fast float @llvm.vector.reduce.fmin.nxv4f32( %v2) diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-min-max.ll b/llvm/test/Analysis/CostModel/AArch64/sve-min-max.ll --- a/llvm/test/Analysis/CostModel/AArch64/sve-min-max.ll +++ b/llvm/test/Analysis/CostModel/AArch64/sve-min-max.ll @@ -5,20 +5,20 @@ define void @umin() { ; CHECK-LABEL: 'umin' -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i8 = call @llvm.umin.nxv4i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i8 = call @llvm.umin.nxv8i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i8 = call @llvm.umin.nxv16i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = call @llvm.umin.nxv32i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64i8 = call @llvm.umin.nxv64i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i16 = call @llvm.umin.nxv2i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i16 = call @llvm.umin.nxv4i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i16 = call @llvm.umin.nxv8i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = call @llvm.umin.nxv16i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i32 = call @llvm.umin.nxv2i32( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i32 = call @llvm.umin.nxv4i32( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = call @llvm.umin.nxv8i32( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i64 = call @llvm.umin.nxv2i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = call @llvm.umin.nxv4i64( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i8 = call @llvm.umin.nxv4i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i8 = call @llvm.umin.nxv8i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16i8 = call @llvm.umin.nxv16i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32i8 = call @llvm.umin.nxv32i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = call @llvm.umin.nxv64i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i16 = call @llvm.umin.nxv2i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i16 = call @llvm.umin.nxv4i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i16 = call @llvm.umin.nxv8i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i16 = call @llvm.umin.nxv16i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i32 = call @llvm.umin.nxv2i32( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i32 = call @llvm.umin.nxv4i32( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i32 = call @llvm.umin.nxv8i32( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i64 = call @llvm.umin.nxv2i64( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i64 = call @llvm.umin.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %V4i8 = call @llvm.umin.nxv4i8( undef, undef) @@ -40,20 +40,20 @@ define void @umax() { ; CHECK-LABEL: 'umax' -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i8 = call @llvm.umax.nxv4i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i8 = call @llvm.umax.nxv8i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i8 = call @llvm.umax.nxv16i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = call @llvm.umax.nxv32i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64i8 = call @llvm.umax.nxv64i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i16 = call @llvm.umax.nxv2i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i16 = call @llvm.umax.nxv4i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i16 = call @llvm.umax.nxv8i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = call @llvm.umax.nxv16i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i32 = call @llvm.umax.nxv2i32( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i32 = call @llvm.umax.nxv4i32( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = call @llvm.umax.nxv8i32( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i64 = call @llvm.umax.nxv2i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = call @llvm.umax.nxv4i64( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i8 = call @llvm.umax.nxv4i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i8 = call @llvm.umax.nxv8i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16i8 = call @llvm.umax.nxv16i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32i8 = call @llvm.umax.nxv32i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = call @llvm.umax.nxv64i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i16 = call @llvm.umax.nxv2i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i16 = call @llvm.umax.nxv4i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i16 = call @llvm.umax.nxv8i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i16 = call @llvm.umax.nxv16i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i32 = call @llvm.umax.nxv2i32( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i32 = call @llvm.umax.nxv4i32( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i32 = call @llvm.umax.nxv8i32( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i64 = call @llvm.umax.nxv2i64( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i64 = call @llvm.umax.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %V4i8 = call @llvm.umax.nxv4i8( undef, undef) @@ -75,20 +75,20 @@ define void @smin() { ; CHECK-LABEL: 'smin' -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i8 = call @llvm.smin.nxv4i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i8 = call @llvm.smin.nxv8i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i8 = call @llvm.smin.nxv16i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = call @llvm.smin.nxv32i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64i8 = call @llvm.smin.nxv64i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i16 = call @llvm.smin.nxv2i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i16 = call @llvm.smin.nxv4i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i16 = call @llvm.smin.nxv8i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = call @llvm.smin.nxv16i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i32 = call @llvm.smin.nxv2i32( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i32 = call @llvm.smin.nxv4i32( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = call @llvm.smin.nxv8i32( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i64 = call @llvm.smin.nxv2i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = call @llvm.smin.nxv4i64( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i8 = call @llvm.smin.nxv4i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i8 = call @llvm.smin.nxv8i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16i8 = call @llvm.smin.nxv16i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32i8 = call @llvm.smin.nxv32i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = call @llvm.smin.nxv64i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i16 = call @llvm.smin.nxv2i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i16 = call @llvm.smin.nxv4i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i16 = call @llvm.smin.nxv8i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i16 = call @llvm.smin.nxv16i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i32 = call @llvm.smin.nxv2i32( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i32 = call @llvm.smin.nxv4i32( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i32 = call @llvm.smin.nxv8i32( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i64 = call @llvm.smin.nxv2i64( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i64 = call @llvm.smin.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %V4i8 = call @llvm.smin.nxv4i8( undef, undef) @@ -110,20 +110,20 @@ define void @smax() { ; CHECK-LABEL: 'smax' -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i8 = call @llvm.smax.nxv4i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i8 = call @llvm.smax.nxv8i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i8 = call @llvm.smax.nxv16i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = call @llvm.smax.nxv32i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64i8 = call @llvm.smax.nxv64i8( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i16 = call @llvm.smax.nxv2i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i16 = call @llvm.smax.nxv4i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i16 = call @llvm.smax.nxv8i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = call @llvm.smax.nxv16i16( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i32 = call @llvm.smax.nxv2i32( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i32 = call @llvm.smax.nxv4i32( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = call @llvm.smax.nxv8i32( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i64 = call @llvm.smax.nxv2i64( undef, undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = call @llvm.smax.nxv4i64( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i8 = call @llvm.smax.nxv4i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i8 = call @llvm.smax.nxv8i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16i8 = call @llvm.smax.nxv16i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32i8 = call @llvm.smax.nxv32i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = call @llvm.smax.nxv64i8( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i16 = call @llvm.smax.nxv2i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i16 = call @llvm.smax.nxv4i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i16 = call @llvm.smax.nxv8i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i16 = call @llvm.smax.nxv16i16( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i32 = call @llvm.smax.nxv2i32( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i32 = call @llvm.smax.nxv4i32( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i32 = call @llvm.smax.nxv8i32( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i64 = call @llvm.smax.nxv2i64( undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i64 = call @llvm.smax.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %V4i8 = call @llvm.smax.nxv4i8( undef, undef)