; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+sse2 | FileCheck %s -check-prefixes=CHECK,SSE,SSE2 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+ssse3 | FileCheck %s -check-prefixes=CHECK,SSE,SSSE3 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+sse4.2 | FileCheck %s -check-prefixes=CHECK,SSE,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+avx | FileCheck %s -check-prefixes=CHECK,AVX,AVX1 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+avx2 | FileCheck %s -check-prefixes=CHECK,AVX,AVX2 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+xop,+avx | FileCheck %s -check-prefixes=CHECK,AVX,XOPAVX1 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+xop,+avx2 | FileCheck %s -check-prefixes=CHECK,AVX,XOPAVX2 ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 ; Verify the cost model for alternate shuffles. ; shufflevector instructions with illegal 64-bit vector types. ; 64-bit packed integer vectors (v2i32) are promoted to type v2i64. ; 64-bit packed float vectors (v2f32) are widened to type v4f32. define <2 x i32> @test_v2i32(<2 x i32> %a, <2 x i32> %b) { ; SSE2-LABEL: 'test_v2i32' ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %1 ; ; SSSE3-LABEL: 'test_v2i32' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %1 ; ; SSE42-LABEL: 'test_v2i32' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %1 ; ; AVX-LABEL: 'test_v2i32' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %1 ; %1 = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> ret <2 x i32> %1 } define <2 x float> @test_v2f32(<2 x float> %a, <2 x float> %b) { ; SSE2-LABEL: 'test_v2f32' ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x float> %1 ; ; SSSE3-LABEL: 'test_v2f32' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x float> %1 ; ; SSE42-LABEL: 'test_v2f32' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x float> %1 ; ; AVX-LABEL: 'test_v2f32' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x float> %1 ; %1 = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> ret <2 x float> %1 } define <2 x i32> @test_v2i32_2(<2 x i32> %a, <2 x i32> %b) { ; SSE2-LABEL: 'test_v2i32_2' ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %1 ; ; SSSE3-LABEL: 'test_v2i32_2' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %1 ; ; SSE42-LABEL: 'test_v2i32_2' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %1 ; ; AVX-LABEL: 'test_v2i32_2' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %1 ; %1 = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> ret <2 x i32> %1 } define <2 x float> @test_v2f32_2(<2 x float> %a, <2 x float> %b) { ; SSE2-LABEL: 'test_v2f32_2' ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x float> %1 ; ; SSSE3-LABEL: 'test_v2f32_2' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x float> %1 ; ; SSE42-LABEL: 'test_v2f32_2' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x float> %1 ; ; AVX-LABEL: 'test_v2f32_2' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x float> %1 ; %1 = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> ret <2 x float> %1 } ; Test shuffles on packed vectors of two elements. define <2 x i64> @test_v2i64(<2 x i64> %a, <2 x i64> %b) { ; CHECK-LABEL: 'test_v2i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %1 ; %1 = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> ret <2 x i64> %1 } define <2 x double> @test_v2f64(<2 x double> %a, <2 x double> %b) { ; CHECK-LABEL: 'test_v2f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %1 ; %1 = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> ret <2 x double> %1 } define <2 x i64> @test_v2i64_2(<2 x i64> %a, <2 x i64> %b) { ; CHECK-LABEL: 'test_v2i64_2' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %1 ; %1 = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> ret <2 x i64> %1 } define <2 x double> @test_v2f64_2(<2 x double> %a, <2 x double> %b) { ; CHECK-LABEL: 'test_v2f64_2' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %1 ; %1 = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> ret <2 x double> %1 } ; Test shuffles on packed vectors of four elements. define <4 x i32> @test_v4i32(<4 x i32> %a, <4 x i32> %b) { ; SSE2-LABEL: 'test_v4i32' ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %1 ; ; SSSE3-LABEL: 'test_v4i32' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %1 ; ; SSE42-LABEL: 'test_v4i32' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %1 ; ; AVX-LABEL: 'test_v4i32' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %1 ; %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ret <4 x i32> %1 } define <4 x i32> @test_v4i32_2(<4 x i32> %a, <4 x i32> %b) { ; SSE2-LABEL: 'test_v4i32_2' ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %1 ; ; SSSE3-LABEL: 'test_v4i32_2' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %1 ; ; SSE42-LABEL: 'test_v4i32_2' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %1 ; ; AVX-LABEL: 'test_v4i32_2' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %1 ; %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ret <4 x i32> %1 } define <4 x i32> @test_v4i32_3(<4 x i32> %a, <4 x i32> %b) { ; SSE2-LABEL: 'test_v4i32_3' ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %1 ; ; SSSE3-LABEL: 'test_v4i32_3' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %1 ; ; SSE42-LABEL: 'test_v4i32_3' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %1 ; ; AVX-LABEL: 'test_v4i32_3' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %1 ; %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> ret <4 x i32> %1 } define <4 x float> @test_v4f32(<4 x float> %a, <4 x float> %b) { ; SSE2-LABEL: 'test_v4f32' ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1 ; ; SSSE3-LABEL: 'test_v4f32' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1 ; ; SSE42-LABEL: 'test_v4f32' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1 ; ; AVX-LABEL: 'test_v4f32' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1 ; %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ret <4 x float> %1 } define <4 x float> @test_v4f32_2(<4 x float> %a, <4 x float> %b) { ; SSE2-LABEL: 'test_v4f32_2' ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1 ; ; SSSE3-LABEL: 'test_v4f32_2' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1 ; ; SSE42-LABEL: 'test_v4f32_2' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1 ; ; AVX-LABEL: 'test_v4f32_2' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1 ; %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ret <4 x float> %1 } define <4 x float> @test_v4f32_3(<4 x float> %a, <4 x float> %b) { ; SSE2-LABEL: 'test_v4f32_3' ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1 ; ; SSSE3-LABEL: 'test_v4f32_3' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1 ; ; SSE42-LABEL: 'test_v4f32_3' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1 ; ; AVX-LABEL: 'test_v4f32_3' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %1 ; %1 = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> ret <4 x float> %1 } define <4 x i64> @test_v4i64(<4 x i64> %a, <4 x i64> %b) { ; SSE-LABEL: 'test_v4i64' ; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> ; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %1 ; ; AVX-LABEL: 'test_v4i64' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %1 ; %1 = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> ret <4 x i64> %1 } define <4 x i64> @test_v4i64_2(<4 x i64> %a, <4 x i64> %b) { ; SSE-LABEL: 'test_v4i64_2' ; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> ; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %1 ; ; AVX-LABEL: 'test_v4i64_2' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %1 ; %1 = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> ret <4 x i64> %1 } define <4 x i64> @test_v4i64_3(<4 x i64> %a, <4 x i64> %b) { ; SSE-LABEL: 'test_v4i64_3' ; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> ; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %1 ; ; AVX-LABEL: 'test_v4i64_3' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %1 ; %1 = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> ret <4 x i64> %1 } define <4 x double> @test_v4f64(<4 x double> %a, <4 x double> %b) { ; SSE-LABEL: 'test_v4f64' ; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> ; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x double> %1 ; ; AVX-LABEL: 'test_v4f64' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x double> %1 ; %1 = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> ret <4 x double> %1 } define <4 x double> @test_v4f64_2(<4 x double> %a, <4 x double> %b) { ; SSE-LABEL: 'test_v4f64_2' ; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> ; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x double> %1 ; ; AVX-LABEL: 'test_v4f64_2' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x double> %1 ; %1 = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> ret <4 x double> %1 } define <4 x double> @test_v4f64_3(<4 x double> %a, <4 x double> %b) { ; SSE-LABEL: 'test_v4f64_3' ; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> ; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x double> %1 ; ; AVX-LABEL: 'test_v4f64_3' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x double> %1 ; %1 = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> ret <4 x double> %1 } ; Test shuffles on packed vectors of eight elements. define <8 x i16> @test_v8i16(<8 x i16> %a, <8 x i16> %b) { ; SSE2-LABEL: 'test_v8i16' ; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %1 ; ; SSSE3-LABEL: 'test_v8i16' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %1 ; ; SSE42-LABEL: 'test_v8i16' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %1 ; ; AVX-LABEL: 'test_v8i16' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %1 ; %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ret <8 x i16> %1 } define <8 x i16> @test_v8i16_2(<8 x i16> %a, <8 x i16> %b) { ; SSE2-LABEL: 'test_v8i16_2' ; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %1 ; ; SSSE3-LABEL: 'test_v8i16_2' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %1 ; ; SSE42-LABEL: 'test_v8i16_2' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %1 ; ; AVX-LABEL: 'test_v8i16_2' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %1 ; %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ret <8 x i16> %1 } define <8 x i16> @test_v8i16_3(<8 x i16> %a, <8 x i16> %b) { ; SSE2-LABEL: 'test_v8i16_3' ; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %1 ; ; SSSE3-LABEL: 'test_v8i16_3' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %1 ; ; SSE42-LABEL: 'test_v8i16_3' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %1 ; ; AVX-LABEL: 'test_v8i16_3' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %1 ; %1 = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> ret <8 x i16> %1 } define <8 x i32> @test_v8i32(<8 x i32> %a, <8 x i32> %b) { ; SSE2-LABEL: 'test_v8i32' ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %1 ; ; SSSE3-LABEL: 'test_v8i32' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %1 ; ; SSE42-LABEL: 'test_v8i32' ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %1 ; ; AVX-LABEL: 'test_v8i32' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %1 ; %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ret <8 x i32> %1 } define <8 x i32> @test_v8i32_2(<8 x i32> %a, <8 x i32> %b) { ; SSE2-LABEL: 'test_v8i32_2' ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %1 ; ; SSSE3-LABEL: 'test_v8i32_2' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %1 ; ; SSE42-LABEL: 'test_v8i32_2' ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %1 ; ; AVX-LABEL: 'test_v8i32_2' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %1 ; %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ret <8 x i32> %1 } define <8 x i32> @test_v8i32_3(<8 x i32> %a, <8 x i32> %b) { ; SSE2-LABEL: 'test_v8i32_3' ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %1 ; ; SSSE3-LABEL: 'test_v8i32_3' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %1 ; ; SSE42-LABEL: 'test_v8i32_3' ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %1 ; ; AVX-LABEL: 'test_v8i32_3' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %1 ; %1 = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> ret <8 x i32> %1 } define <8 x float> @test_v8f32(<8 x float> %a, <8 x float> %b) { ; SSE2-LABEL: 'test_v8f32' ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x float> %1 ; ; SSSE3-LABEL: 'test_v8f32' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x float> %1 ; ; SSE42-LABEL: 'test_v8f32' ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x float> %1 ; ; AVX-LABEL: 'test_v8f32' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x float> %1 ; %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ret <8 x float> %1 } define <8 x float> @test_v8f32_2(<8 x float> %a, <8 x float> %b) { ; SSE2-LABEL: 'test_v8f32_2' ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x float> %1 ; ; SSSE3-LABEL: 'test_v8f32_2' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x float> %1 ; ; SSE42-LABEL: 'test_v8f32_2' ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x float> %1 ; ; AVX-LABEL: 'test_v8f32_2' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x float> %1 ; %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ret <8 x float> %1 } define <8 x float> @test_v8f32_3(<8 x float> %a, <8 x float> %b) { ; SSE2-LABEL: 'test_v8f32_3' ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x float> %1 ; ; SSSE3-LABEL: 'test_v8f32_3' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x float> %1 ; ; SSE42-LABEL: 'test_v8f32_3' ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x float> %1 ; ; AVX-LABEL: 'test_v8f32_3' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x float> %1 ; %1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> ret <8 x float> %1 } ; Test shuffles on packed vectors of sixteen elements. define <16 x i8> @test_v16i8(<16 x i8> %a, <16 x i8> %b) { ; SSE2-LABEL: 'test_v16i8' ; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %1 ; ; SSSE3-LABEL: 'test_v16i8' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %1 ; ; SSE42-LABEL: 'test_v16i8' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %1 ; ; AVX-LABEL: 'test_v16i8' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %1 ; %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ret <16 x i8> %1 } define <16 x i8> @test_v16i8_2(<16 x i8> %a, <16 x i8> %b) { ; SSE2-LABEL: 'test_v16i8_2' ; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %1 ; ; SSSE3-LABEL: 'test_v16i8_2' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %1 ; ; SSE42-LABEL: 'test_v16i8_2' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %1 ; ; AVX-LABEL: 'test_v16i8_2' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %1 ; %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ret <16 x i8> %1 } define <16 x i8> @test_v16i8_3(<16 x i8> %a, <16 x i8> %b) { ; SSE2-LABEL: 'test_v16i8_3' ; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %1 ; ; SSSE3-LABEL: 'test_v16i8_3' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %1 ; ; SSE42-LABEL: 'test_v16i8_3' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %1 ; ; AVX-LABEL: 'test_v16i8_3' ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %1 ; %1 = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> ret <16 x i8> %1 } define <16 x i16> @test_v16i16(<16 x i16> %a, <16 x i16> %b) { ; SSE2-LABEL: 'test_v16i16' ; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; SSSE3-LABEL: 'test_v16i16' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; SSE42-LABEL: 'test_v16i16' ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; AVX1-LABEL: 'test_v16i16' ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; AVX2-LABEL: 'test_v16i16' ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; XOPAVX1-LABEL: 'test_v16i16' ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; XOPAVX2-LABEL: 'test_v16i16' ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; BTVER2-LABEL: 'test_v16i16' ; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ret <16 x i16> %1 } define <16 x i16> @test_v16i16_2(<16 x i16> %a, <16 x i16> %b) { ; SSE2-LABEL: 'test_v16i16_2' ; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; SSSE3-LABEL: 'test_v16i16_2' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; SSE42-LABEL: 'test_v16i16_2' ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; AVX1-LABEL: 'test_v16i16_2' ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; AVX2-LABEL: 'test_v16i16_2' ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; XOPAVX1-LABEL: 'test_v16i16_2' ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; XOPAVX2-LABEL: 'test_v16i16_2' ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; BTVER2-LABEL: 'test_v16i16_2' ; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ret <16 x i16> %1 } define <16 x i16> @test_v16i16_3(<16 x i16> %a, <16 x i16> %b) { ; SSE2-LABEL: 'test_v16i16_3' ; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; SSSE3-LABEL: 'test_v16i16_3' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; SSE42-LABEL: 'test_v16i16_3' ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; AVX1-LABEL: 'test_v16i16_3' ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; AVX2-LABEL: 'test_v16i16_3' ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; XOPAVX1-LABEL: 'test_v16i16_3' ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; XOPAVX2-LABEL: 'test_v16i16_3' ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; ; BTVER2-LABEL: 'test_v16i16_3' ; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %1 ; %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> ret <16 x i16> %1 } define <32 x i8> @test_v32i8(<32 x i8> %a, <32 x i8> %b) { ; SSE2-LABEL: 'test_v32i8' ; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; SSSE3-LABEL: 'test_v32i8' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; SSE42-LABEL: 'test_v32i8' ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; AVX1-LABEL: 'test_v32i8' ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; AVX2-LABEL: 'test_v32i8' ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; XOPAVX1-LABEL: 'test_v32i8' ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; XOPAVX2-LABEL: 'test_v32i8' ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; BTVER2-LABEL: 'test_v32i8' ; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ret <32 x i8> %1 } define <32 x i8> @test_v32i8_2(<32 x i8> %a, <32 x i8> %b) { ; SSE2-LABEL: 'test_v32i8_2' ; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; SSSE3-LABEL: 'test_v32i8_2' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; SSE42-LABEL: 'test_v32i8_2' ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; AVX1-LABEL: 'test_v32i8_2' ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; AVX2-LABEL: 'test_v32i8_2' ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; XOPAVX1-LABEL: 'test_v32i8_2' ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; XOPAVX2-LABEL: 'test_v32i8_2' ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; BTVER2-LABEL: 'test_v32i8_2' ; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ret <32 x i8> %1 } define <32 x i8> @test_v32i8_3(<32 x i8> %a, <32 x i8> %b) { ; SSE2-LABEL: 'test_v32i8_3' ; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; SSSE3-LABEL: 'test_v32i8_3' ; SSSE3-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; SSE42-LABEL: 'test_v32i8_3' ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; AVX1-LABEL: 'test_v32i8_3' ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; AVX2-LABEL: 'test_v32i8_3' ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; XOPAVX1-LABEL: 'test_v32i8_3' ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; XOPAVX2-LABEL: 'test_v32i8_3' ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; ; BTVER2-LABEL: 'test_v32i8_3' ; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %1 ; %1 = shufflevector <32 x i8> %a, <32 x i8> %b, <32 x i32> ret <32 x i8> %1 }