; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5 ; RUN: opt -passes="print" -cost-kind=throughput 2>&1 -disable-output -mtriple=aarch64--linux-gnu -mattr=+sve2p1 < %s | FileCheck %s ; RUN: opt -passes="print" -cost-kind=throughput 2>&1 -disable-output -mtriple=aarch64--linux-gnu -mattr=+sme2p1 -force-streaming < %s | FileCheck %s ;; Broadcast indexed lane within 128b segments (dupq zd.t, zn.t[idx]) define void @dup_within_each_segment_256b() #0 { ; CHECK-LABEL: 'dup_within_each_segment_256b' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dupq_b11 = shufflevector <32 x i8> poison, <32 x i8> poison, <32 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dupq_h2 = shufflevector <16 x i16> poison, <16 x i16> poison, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dupq_s3 = shufflevector <8 x i32> poison, <8 x i32> poison, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dupq_d0 = shufflevector <4 x i64> poison, <4 x i64> poison, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %dupq_512b_d1 = shufflevector <8 x i64> poison, <8 x i64> poison, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dupq_s3_with_poison = shufflevector <8 x i32> poison, <8 x i32> poison, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %dupq_b11 = shufflevector <32 x i8> poison, <32 x i8> poison, <32 x i32> %dupq_h2 = shufflevector <16 x i16> poison, <16 x i16> poison, <16 x i32> %dupq_s3 = shufflevector <8 x i32> poison, <8 x i32> poison, <8 x i32> %dupq_d0 = shufflevector <4 x i64> poison, <4 x i64> poison, <4 x i32> %dupq_512b_d1 = shufflevector <8 x i64> poison, <8 x i64> poison, <8 x i32> %dupq_s3_with_poison = shufflevector <8 x i32> poison, <8 x i32> poison, <8 x i32> ret void } define void @dup_within_each_segment_512b() #1 { ; CHECK-LABEL: 'dup_within_each_segment_512b' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dupq_b11 = shufflevector <32 x i8> poison, <32 x i8> poison, <32 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dupq_h2 = shufflevector <16 x i16> poison, <16 x i16> poison, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dupq_s3 = shufflevector <8 x i32> poison, <8 x i32> poison, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dupq_d0 = shufflevector <4 x i64> poison, <4 x i64> poison, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dupq_512b_d1 = shufflevector <8 x i64> poison, <8 x i64> poison, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dupq_s3_with_poison = shufflevector <8 x i32> poison, <8 x i32> poison, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %dupq_b11 = shufflevector <32 x i8> poison, <32 x i8> poison, <32 x i32> %dupq_h2 = shufflevector <16 x i16> poison, <16 x i16> poison, <16 x i32> %dupq_s3 = shufflevector <8 x i32> poison, <8 x i32> poison, <8 x i32> %dupq_d0 = shufflevector <4 x i64> poison, <4 x i64> poison, <4 x i32> %dupq_512b_d1 = shufflevector <8 x i64> poison, <8 x i64> poison, <8 x i32> %dupq_s3_with_poison = shufflevector <8 x i32> poison, <8 x i32> poison, <8 x i32> ret void } define void @dup_whole_segment_256b() #0 { ; CHECK-LABEL: 'dup_whole_segment_256b' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dup_seg_b = shufflevector <32 x i8> poison, <32 x i8> poison, <32 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dup_seg_h = shufflevector <16 x i16> poison, <16 x i16> poison, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dup_seg_s = shufflevector <8 x i32> poison, <8 x i32> poison, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dup_seg_d = shufflevector <4 x i64> poison, <4 x i64> poison, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dup_seg_512b_d = shufflevector <8 x double> poison, <8 x double> poison, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dup_seg_s_with_poison = shufflevector <8 x float> poison, <8 x float> poison, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %dup_seg_b = shufflevector <32 x i8> poison, <32 x i8> poison, <32 x i32> %dup_seg_h = shufflevector <16 x i16> poison, <16 x i16> poison, <16 x i32> %dup_seg_s = shufflevector <8 x i32> poison, <8 x i32> poison, <8 x i32> %dup_seg_d = shufflevector <4 x i64> poison, <4 x i64> poison, <4 x i32> %dup_seg_512b_d = shufflevector <8 x double> poison, <8 x double> poison, <8 x i32> %dup_seg_s_with_poison = shufflevector <8 x float> poison, <8 x float> poison, <8 x i32> ret void } define void @dup_whole_segment_512b() #1 { ; CHECK-LABEL: 'dup_whole_segment_512b' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dup_seg_b = shufflevector <32 x i8> poison, <32 x i8> poison, <32 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dup_seg_h = shufflevector <16 x i16> poison, <16 x i16> poison, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dup_seg_s = shufflevector <8 x i32> poison, <8 x i32> poison, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dup_seg_d = shufflevector <4 x i64> poison, <4 x i64> poison, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dup_seg_512b_d = shufflevector <8 x double> poison, <8 x double> poison, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %dup_seg_s_with_poison = shufflevector <8 x float> poison, <8 x float> poison, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %dup_seg_b = shufflevector <32 x i8> poison, <32 x i8> poison, <32 x i32> %dup_seg_h = shufflevector <16 x i16> poison, <16 x i16> poison, <16 x i32> %dup_seg_s = shufflevector <8 x i32> poison, <8 x i32> poison, <8 x i32> %dup_seg_d = shufflevector <4 x i64> poison, <4 x i64> poison, <4 x i32> %dup_seg_512b_d = shufflevector <8 x double> poison, <8 x double> poison, <8 x i32> %dup_seg_s_with_poison = shufflevector <8 x float> poison, <8 x float> poison, <8 x i32> ret void } attributes #0 = { noinline vscale_range(2,2) } attributes #1 = { noinline vscale_range(4,4) }