; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64--linux-gnu -passes="print" 2>&1 -disable-output | FileCheck %s target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" define void @shuffle() { ; CHECK-LABEL: 'shuffle' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v10b = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v18 = shufflevector <2 x fp128> undef, <2 x fp128> undef, <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> %v10b = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> %v18 = shufflevector <2 x fp128> undef, <2 x fp128> undef, <2 x i32> ret void } define void @concat() { ; CHECK-LABEL: 'concat' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = shufflevector <2 x i8> undef, <2 x i8> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = shufflevector <4 x i8> undef, <4 x i8> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8 = shufflevector <8 x i8> undef, <8 x i8> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i16 = shufflevector <2 x i16> undef, <2 x i16> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16 = shufflevector <4 x i16> undef, <4 x i16> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16 = shufflevector <8 x i16> undef, <8 x i16> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32 = shufflevector <2 x i32> undef, <2 x i32> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32 = shufflevector <4 x i32> undef, <4 x i32> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i64 = shufflevector <2 x i64> undef, <2 x i64> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4f16 = shufflevector <2 x half> undef, <2 x half> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16 = shufflevector <4 x half> undef, <4 x half> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f16 = shufflevector <8 x half> undef, <8 x half> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4f32 = shufflevector <2 x float> undef, <2 x float> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f32 = shufflevector <4 x float> undef, <4 x float> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f64 = shufflevector <2 x double> undef, <2 x double> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v4i8 = shufflevector <2 x i8> undef, <2 x i8> undef, <4 x i32> %v8i8 = shufflevector <4 x i8> undef, <4 x i8> undef, <8 x i32> %v16i8 = shufflevector <8 x i8> undef, <8 x i8> undef, <16 x i32> %v4i16 = shufflevector <2 x i16> undef, <2 x i16> undef, <4 x i32> %v8i16 = shufflevector <4 x i16> undef, <4 x i16> undef, <8 x i32> %v16i16 = shufflevector <8 x i16> undef, <8 x i16> undef, <16 x i32> %v4i32 = shufflevector <2 x i32> undef, <2 x i32> undef, <4 x i32> %v8i32 = shufflevector <4 x i32> undef, <4 x i32> undef, <8 x i32> %v4i64 = shufflevector <2 x i64> undef, <2 x i64> undef, <4 x i32> %v4f16 = shufflevector <2 x half> undef, <2 x half> undef, <4 x i32> %v8f16 = shufflevector <4 x half> undef, <4 x half> undef, <8 x i32> %v16f16 = shufflevector <8 x half> undef, <8 x half> undef, <16 x i32> %v4f32 = shufflevector <2 x float> undef, <2 x float> undef, <4 x i32> %v8f32 = shufflevector <4 x float> undef, <4 x float> undef, <8 x i32> %v4f64 = shufflevector <2 x double> undef, <2 x double> undef, <4 x i32> ret void } define void @insert_subvec() { ; CHECK-LABEL: 'insert_subvec' ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %v4i8_2_0 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_2_1 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %v8i8_2_0 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_2_1 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_2_2 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_2_3 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v8i8_2_05 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %v16i8_4_0 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_4_1 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_4_2 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_4_3 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %v16i8_4_05 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_2_0 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_2_1 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %v8i16_2_0 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_2_1 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_2_2 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_2_3 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v8i16_2_05 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %v16i16_4_0 = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_4_1 = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_4_2 = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_4_3 = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %v16i16_4_05 = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_2_0 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_2_1 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_2_0 = shufflevector <8 x i32> undef, <8 x i32> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_2_1 = shufflevector <8 x i32> undef, <8 x i32> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_2_2 = shufflevector <8 x i32> undef, <8 x i32> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_2_3 = shufflevector <8 x i32> undef, <8 x i32> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v8i32_2_05 = shufflevector <8 x i32> undef, <8 x i32> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i32_4_0 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_4_1 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_4_2 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_4_3 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %v16i32_4_05 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v4i8_2_0 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> %v4i8_2_1 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> %v8i8_2_0 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> %v8i8_2_1 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> %v8i8_2_2 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> %v8i8_2_3 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> %v8i8_2_05 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> %v16i8_4_0 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> %v16i8_4_1 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> %v16i8_4_2 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> %v16i8_4_3 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> %v16i8_4_05 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> %v4i16_2_0 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> %v4i16_2_1 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> %v8i16_2_0 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> %v8i16_2_1 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> %v8i16_2_2 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> %v8i16_2_3 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> %v8i16_2_05 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> %v16i16_4_0 = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> %v16i16_4_1 = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> %v16i16_4_2 = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> %v16i16_4_3 = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> %v16i16_4_05 = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> %v4i32_2_0 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> %v4i32_2_1 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> %v8i32_2_0 = shufflevector <8 x i32> undef, <8 x i32> undef, <8 x i32> %v8i32_2_1 = shufflevector <8 x i32> undef, <8 x i32> undef, <8 x i32> %v8i32_2_2 = shufflevector <8 x i32> undef, <8 x i32> undef, <8 x i32> %v8i32_2_3 = shufflevector <8 x i32> undef, <8 x i32> undef, <8 x i32> %v8i32_2_05 = shufflevector <8 x i32> undef, <8 x i32> undef, <8 x i32> %v16i32_4_0 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> %v16i32_4_1 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> %v16i32_4_2 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> %v16i32_4_3 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> %v16i32_4_05 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> ret void } define void @multipart() { ; CHECK-LABEL: 'multipart' ; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %v16a = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v16b = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %v16c = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %v16d = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32a = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v32a4 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v32idrev = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %v32many = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v32many2 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v323 = shufflevector <3 x i32> undef, <3 x i32> undef, <3 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64a = shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64b = shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> zeroinitializer ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64ab = shufflevector <4 x i64> undef, <4 x i64> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64d = shufflevector <4 x i64> undef, <4 x i64> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f64a = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f64b = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> zeroinitializer ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f64ab = shufflevector <4 x double> undef, <4 x double> undef, <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v16a = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> %v16b = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> %v16c = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> %v16d = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> %v32a = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> %v32a4 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> %v32idrev = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> %v32many = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> %v32many2 = shufflevector <16 x i32> undef, <16 x i32> undef, <16 x i32> %v323 = shufflevector <3 x i32> undef, <3 x i32> undef, <3 x i32> %v64a = shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> %v64b = shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> %v64ab = shufflevector <4 x i64> undef, <4 x i64> undef, <4 x i32> %v64d = shufflevector <4 x i64> undef, <4 x i64> undef, <4 x i32> %f64a = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> %f64b = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> %f64ab = shufflevector <4 x double> undef, <4 x double> undef, <4 x i32> ret void }