; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-unknown-linux-gnu -mcpu=skylake-avx512 | FileCheck %s --check-prefix=SKX ; ; Verify the cost model for 1 src shuffles ; ; SKX-LABEL: 'test_vXf64' define void @test_vXf64(<4 x double> %src256, <8 x double> %src512, <16 x double> %src1024) { ; SKX: cost of 1 {{.*}} %V256 = shufflevector %V256 = shufflevector <4 x double> %src256, <4 x double> undef, <4 x i32> ; SKX: cost of 1 {{.*}} %V512 = shufflevector %V512 = shufflevector <8 x double> %src512, <8 x double> undef, <8 x i32> ; SKX: cost of 2 {{.*}} %V1024 = shufflevector %V1024 = shufflevector <16 x double> %src1024, <16 x double> undef, <16 x i32> ret void } ; SKX-LABEL: 'test_vXi64' define void @test_vXi64(<4 x i64> %src256, <8 x i64> %src512) { ; SKX: cost of 1 {{.*}} %V256 = shufflevector %V256 = shufflevector <4 x i64> %src256, <4 x i64> undef, <4 x i32> ; SKX: cost of 1 {{.*}} %V512 = shufflevector %V512 = shufflevector <8 x i64> %src512, <8 x i64> undef, <8 x i32> ret void } ; CHECK-LABEL: 'test_vXf32' define void @test_vXf32(<4 x float> %src128, <8 x float> %src256, <16 x float> %src512) { ; SKX: cost of 1 {{.*}} %V128 = shufflevector %V128 = shufflevector <4 x float> %src128, <4 x float> undef, <4 x i32> ; SKX: cost of 1 {{.*}} %V256 = shufflevector %V256 = shufflevector <8 x float> %src256, <8 x float> undef, <8 x i32> ; SKX: cost of 1 {{.*}} %V512 = shufflevector %V512 = shufflevector <16 x float> %src512, <16 x float> undef, <16 x i32> ret void } ; CHECK-LABEL: 'test_vXi32' define void @test_vXi32(<4 x i32> %src128, <8 x i32> %src256, <16 x i32> %src512, <32 x i32> %src1024) { ; SKX: cost of 1 {{.*}} %V128 = shufflevector %V128 = shufflevector <4 x i32> %src128, <4 x i32> undef, <4 x i32> ; SKX: cost of 1 {{.*}} %V256 = shufflevector %V256 = shufflevector <8 x i32> %src256, <8 x i32> undef, <8 x i32> ; SKX: cost of 1 {{.*}} %V512 = shufflevector %V512 = shufflevector <16 x i32> %src512, <16 x i32> undef, <16 x i32> ; SKX: cost of 2 {{.*}} %V1024 = shufflevector %V1024 = shufflevector <32 x i32> %src1024, <32 x i32> undef, <32 x i32> ret void } ; CHECK-LABEL: 'test_vXi16' define void @test_vXi16(<8 x i16> %src128, <16 x i16> %src256, <32 x i16> %src512, <64 x i16> %src1024) { ; SKX: cost of 1 {{.*}} %V128 = shufflevector %V128 = shufflevector <8 x i16> %src128, <8 x i16> undef, <8 x i32> ; SKX: cost of 1 {{.*}} %V256 = shufflevector %V256 = shufflevector <16 x i16> %src256, <16 x i16> undef, <16 x i32> ; SKX: cost of 1 {{.*}} %V512 = shufflevector %V512 = shufflevector <32 x i16> %src512, <32 x i16> undef, <32 x i32> ; SKX: cost of 2 {{.*}} %V1024 = shufflevector %V1024 = shufflevector <64 x i16> %src1024, <64 x i16> undef, <64 x i32> ret void } ; CHECK-LABEL: 'test_vXi8' define void @test_vXi8(<16 x i8> %src128, <32 x i8> %src256, <64 x i8> %src512) { ; SKX: cost of 1 {{.*}} %V128 = shufflevector %V128 = shufflevector <16 x i8> %src128, <16 x i8> undef, <16 x i32> ; SKX: cost of 3 {{.*}} %V256 = shufflevector %V256 = shufflevector <32 x i8> %src256, <32 x i8> undef, <32 x i32> ; SKX: cost of 8 {{.*}} %V512 = shufflevector %V512 = shufflevector <64 x i8> %src512, <64 x i8> undef, <64 x i32> ret void }