diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-gather.ll b/llvm/test/Analysis/CostModel/AArch64/sve-gather.ll index 866e038f145441..ccce7a57263038 100644 --- a/llvm/test/Analysis/CostModel/AArch64/sve-gather.ll +++ b/llvm/test/Analysis/CostModel/AArch64/sve-gather.ll @@ -17,8 +17,40 @@ define void @masked_gathers( %nxv4i1mask, %nx ret void } +define void @masked_gathers_no_vscale_range() { +; CHECK-LABEL: 'masked_gathers_no_vscale_range' +; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %res.nxv4f64 = call @llvm.masked.gather.nxv4f64.nxv4p0f64( undef, i32 1, undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %res.nxv2f64 = call @llvm.masked.gather.nxv2f64.nxv2p0f64( undef, i32 1, undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %res.nxv8f32 = call @llvm.masked.gather.nxv8f32.nxv8p0f32( undef, i32 1, undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %res.nxv4f32 = call @llvm.masked.gather.nxv4f32.nxv4p0f32( undef, i32 1, undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %res.nxv2f32 = call @llvm.masked.gather.nxv2f32.nxv2p0f32( undef, i32 1, undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 256 for instruction: %res.nxv16i16 = call @llvm.masked.gather.nxv16i16.nxv16p0i16( undef, i32 1, undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %res.nxv8i16 = call @llvm.masked.gather.nxv8i16.nxv8p0i16( undef, i32 1, undef, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %res.nxv4i16 = call @llvm.masked.gather.nxv4i16.nxv4p0i16( undef, i32 1, undef, undef) + %res.nxv4f64 = call @llvm.masked.gather.nxv4f64( undef, i32 1, undef, undef) + %res.nxv2f64 = call @llvm.masked.gather.nxv2f64( undef, i32 1, undef, undef) + + %res.nxv8f32 = call @llvm.masked.gather.nxv8f32( undef, i32 1, undef, undef) + %res.nxv4f32 = call @llvm.masked.gather.nxv4f32( undef, i32 1, undef, undef) + %res.nxv2f32 = call @llvm.masked.gather.nxv2f32( undef, i32 1, undef, undef) + + %res.nxv16i16 = call @llvm.masked.gather.nxv16i16( undef, i32 1, undef, undef) + %res.nxv8i16 = call @llvm.masked.gather.nxv8i16( undef, i32 1, undef, undef) + %res.nxv4i16 = call @llvm.masked.gather.nxv4i16( undef, i32 1, undef, undef) + + ret void +} + declare @llvm.masked.gather.nxv4i32(, i32, , ) declare @llvm.masked.gather.nxv8i32(, i32, , ) declare <4 x i32> @llvm.masked.gather.v4i32(<4 x i32*>, i32, <4 x i1>, <4 x i32>) declare <1 x i128> @llvm.masked.gather.v1i128.v1p0i128(<1 x i128*>, i32, <1 x i1>, <1 x i128>) declare @llvm.masked.gather.nxv1i64.nxv1p0i64(, i32, , ) +declare @llvm.masked.gather.nxv4f64(, i32, , ) +declare @llvm.masked.gather.nxv2f64(, i32, , ) +declare @llvm.masked.gather.nxv8f32(, i32, , ) +declare @llvm.masked.gather.nxv4f32(, i32, , ) +declare @llvm.masked.gather.nxv2f32(, i32, , ) +declare @llvm.masked.gather.nxv16i16(, i32, , ) +declare @llvm.masked.gather.nxv8i16(, i32, , ) +declare @llvm.masked.gather.nxv4i16(, i32, , ) diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-scatter.ll b/llvm/test/Analysis/CostModel/AArch64/sve-scatter.ll index a5fa33277b79ee..4abf8c538868cd 100644 --- a/llvm/test/Analysis/CostModel/AArch64/sve-scatter.ll +++ b/llvm/test/Analysis/CostModel/AArch64/sve-scatter.ll @@ -17,8 +17,40 @@ define void @masked_scatters( %nxv4i1mask, %n ret void } +define void @masked_scatters_no_vscale_range() { +; CHECK-LABEL: 'masked_scatters_no_vscale_range' +; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv4f64.nxv4p0f64( undef, undef, i32 1, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv2f64.nxv2p0f64( undef, undef, i32 1, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: call void @llvm.masked.scatter.nxv8f32.nxv8p0f32( undef, undef, i32 1, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv4f32.nxv4p0f32( undef, undef, i32 1, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv2f32.nxv2p0f32( undef, undef, i32 1, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 256 for instruction: call void @llvm.masked.scatter.nxv16i16.nxv16p0i16( undef, undef, i32 1, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: call void @llvm.masked.scatter.nxv8i16.nxv8p0i16( undef, undef, i32 1, undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv4i16.nxv4p0i16( undef, undef, i32 1, undef) + call void @llvm.masked.scatter.nxv4f64( undef, undef, i32 1, undef) + call void @llvm.masked.scatter.nxv2f64( undef, undef, i32 1, undef) + + call void @llvm.masked.scatter.nxv8f32( undef, undef, i32 1, undef) + call void @llvm.masked.scatter.nxv4f32( undef, undef, i32 1, undef) + call void @llvm.masked.scatter.nxv2f32( undef, undef, i32 1, undef) + + call void @llvm.masked.scatter.nxv16i16( undef, undef, i32 1, undef) + call void @llvm.masked.scatter.nxv8i16( undef, undef, i32 1, undef) + call void @llvm.masked.scatter.nxv4i16( undef, undef, i32 1, undef) + + ret void +} + declare void @llvm.masked.scatter.nxv4i32(, , i32, ) declare void @llvm.masked.scatter.nxv8i32(, , i32, ) declare void @llvm.masked.scatter.v4i32(<4 x i32>, <4 x i32*>, i32, <4 x i1>) declare void @llvm.masked.scatter.v1i128.v1p0i128(<1 x i128>, <1 x i128*>, i32, <1 x i1>) declare void @llvm.masked.scatter.nxv1i64.nxv1p0i64(, , i32, ) +declare void @llvm.masked.scatter.nxv4f64(, , i32, ) +declare void @llvm.masked.scatter.nxv2f64(, , i32, ) +declare void @llvm.masked.scatter.nxv8f32(, , i32, ) +declare void @llvm.masked.scatter.nxv4f32(, , i32, ) +declare void @llvm.masked.scatter.nxv2f32(, , i32, ) +declare void @llvm.masked.scatter.nxv16i16(, , i32, ) +declare void @llvm.masked.scatter.nxv8i16(, , i32, ) +declare void @llvm.masked.scatter.nxv4i16(, , i32, )