From 74402acb00d209abced2d3c9d20a08ae3f5b43a6 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 6 Apr 2018 15:28:26 +0000 Subject: [PATCH] [CostModel][X86] Regenerate integer extension/truncation cost tests with update_analyze_test_checks.py llvm-svn: 329402 --- llvm/test/Analysis/CostModel/X86/sse-itoi.ll | 447 +++++++++++++------ 1 file changed, 308 insertions(+), 139 deletions(-) diff --git a/llvm/test/Analysis/CostModel/X86/sse-itoi.ll b/llvm/test/Analysis/CostModel/X86/sse-itoi.ll index 46d993564609..3d18ad8a06b1 100644 --- a/llvm/test/Analysis/CostModel/X86/sse-itoi.ll +++ b/llvm/test/Analysis/CostModel/X86/sse-itoi.ll @@ -1,12 +1,19 @@ -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+sse2 -cost-model -analyze < %s | FileCheck --check-prefix=SSE2 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+sse4.1 -cost-model -analyze < %s | FileCheck --check-prefix=SSE41 %s +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+sse2 | FileCheck %s --check-prefixes=CHECK,SSE2 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+sse4.1 | FileCheck %s --check-prefixes=CHECK,SSE41 define void @zext_v4i8_to_v4i64(<4 x i8>* %a) { -; SSE2: zext_v4i8_to_v4i64 -; SSE2: cost of 4 {{.*}} zext +; SSE2-LABEL: 'zext_v4i8_to_v4i64' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, <4 x i8>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = zext <4 x i8> %1 to <4 x i64> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, <4 x i64>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: zext_v4i8_to_v4i64 -; SSE41: cost of 2 {{.*}} zext +; SSE41-LABEL: 'zext_v4i8_to_v4i64' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, <4 x i8>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <4 x i8> %1 to <4 x i64> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, <4 x i64>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i8>, <4 x i8>* %a %2 = zext <4 x i8> %1 to <4 x i64> @@ -15,11 +22,17 @@ define void @zext_v4i8_to_v4i64(<4 x i8>* %a) { } define void @sext_v4i8_to_v4i64(<4 x i8>* %a) { -; SSE2: sext_v4i8_to_v4i64 -; SSE2: cost of 8 {{.*}} sext +; SSE2-LABEL: 'sext_v4i8_to_v4i64' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, <4 x i8>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %2 = sext <4 x i8> %1 to <4 x i64> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, <4 x i64>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: sext_v4i8_to_v4i64 -; SSE41: cost of 2 {{.*}} sext +; SSE41-LABEL: 'sext_v4i8_to_v4i64' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, <4 x i8>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <4 x i8> %1 to <4 x i64> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, <4 x i64>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i8>, <4 x i8>* %a %2 = sext <4 x i8> %1 to <4 x i64> @@ -28,11 +41,17 @@ define void @sext_v4i8_to_v4i64(<4 x i8>* %a) { } define void @zext_v4i16_to_v4i64(<4 x i16>* %a) { -; SSE2: zext_v4i16_to_v4i64 -; SSE2: cost of 3 {{.*}} zext +; SSE2-LABEL: 'zext_v4i16_to_v4i64' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, <4 x i16>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = zext <4 x i16> %1 to <4 x i64> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, <4 x i64>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: zext_v4i16_to_v4i64 -; SSE41: cost of 2 {{.*}} zext +; SSE41-LABEL: 'zext_v4i16_to_v4i64' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, <4 x i16>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <4 x i16> %1 to <4 x i64> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, <4 x i64>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i16>, <4 x i16>* %a %2 = zext <4 x i16> %1 to <4 x i64> @@ -41,11 +60,17 @@ define void @zext_v4i16_to_v4i64(<4 x i16>* %a) { } define void @sext_v4i16_to_v4i64(<4 x i16>* %a) { -; SSE2: sext_v4i16_to_v4i64 -; SSE2: cost of 10 {{.*}} sext +; SSE2-LABEL: 'sext_v4i16_to_v4i64' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, <4 x i16>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %2 = sext <4 x i16> %1 to <4 x i64> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, <4 x i64>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: sext_v4i16_to_v4i64 -; SSE41: cost of 2 {{.*}} sext +; SSE41-LABEL: 'sext_v4i16_to_v4i64' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, <4 x i16>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <4 x i16> %1 to <4 x i64> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, <4 x i64>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i16>, <4 x i16>* %a %2 = sext <4 x i16> %1 to <4 x i64> @@ -55,11 +80,17 @@ define void @sext_v4i16_to_v4i64(<4 x i16>* %a) { define void @zext_v4i32_to_v4i64(<4 x i32>* %a) { -; SSE2: zext_v4i32_to_v4i64 -; SSE2: cost of 3 {{.*}} zext +; SSE2-LABEL: 'zext_v4i32_to_v4i64' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, <4 x i32>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = zext <4 x i32> %1 to <4 x i64> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, <4 x i64>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: zext_v4i32_to_v4i64 -; SSE41: cost of 2 {{.*}} zext +; SSE41-LABEL: 'zext_v4i32_to_v4i64' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, <4 x i32>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <4 x i32> %1 to <4 x i64> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, <4 x i64>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i32>, <4 x i32>* %a %2 = zext <4 x i32> %1 to <4 x i64> @@ -68,11 +99,17 @@ define void @zext_v4i32_to_v4i64(<4 x i32>* %a) { } define void @sext_v4i32_to_v4i64(<4 x i32>* %a) { -; SSE2: sext_v4i32_to_v4i64 -; SSE2: cost of 5 {{.*}} sext +; SSE2-LABEL: 'sext_v4i32_to_v4i64' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, <4 x i32>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %2 = sext <4 x i32> %1 to <4 x i64> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, <4 x i64>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: sext_v4i32_to_v4i64 -; SSE41: cost of 2 {{.*}} sext +; SSE41-LABEL: 'sext_v4i32_to_v4i64' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, <4 x i32>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <4 x i32> %1 to <4 x i64> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, <4 x i64>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i32>, <4 x i32>* %a %2 = sext <4 x i32> %1 to <4 x i64> @@ -81,11 +118,17 @@ define void @sext_v4i32_to_v4i64(<4 x i32>* %a) { } define void @zext_v16i16_to_v16i32(<16 x i16>* %a) { -; SSE2: zext_v16i16_to_v16i32 -; SSE2: cost of 6 {{.*}} zext +; SSE2-LABEL: 'zext_v16i16_to_v16i32' +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <16 x i16>, <16 x i16>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %2 = zext <16 x i16> %1 to <16 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, <16 x i32>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: zext_v16i16_to_v16i32 -; SSE41: cost of 4 {{.*}} zext +; SSE41-LABEL: 'zext_v16i16_to_v16i32' +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <16 x i16>, <16 x i16>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = zext <16 x i16> %1 to <16 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, <16 x i32>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <16 x i16>, <16 x i16>* %a %2 = zext <16 x i16> %1 to <16 x i32> @@ -94,11 +137,17 @@ define void @zext_v16i16_to_v16i32(<16 x i16>* %a) { } define void @sext_v16i16_to_v16i32(<16 x i16>* %a) { -; SSE2: sext_v16i16_to_v16i32 -; SSE2: cost of 8 {{.*}} sext +; SSE2-LABEL: 'sext_v16i16_to_v16i32' +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <16 x i16>, <16 x i16>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %2 = sext <16 x i16> %1 to <16 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, <16 x i32>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: sext_v16i16_to_v16i32 -; SSE41: cost of 4 {{.*}} sext +; SSE41-LABEL: 'sext_v16i16_to_v16i32' +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <16 x i16>, <16 x i16>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = sext <16 x i16> %1 to <16 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, <16 x i32>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <16 x i16>, <16 x i16>* %a %2 = sext <16 x i16> %1 to <16 x i32> @@ -107,11 +156,17 @@ define void @sext_v16i16_to_v16i32(<16 x i16>* %a) { } define void @zext_v8i16_to_v8i32(<8 x i16>* %a) { -; SSE2: zext_v8i16_to_v8i32 -; SSE2: cost of 3 {{.*}} zext +; SSE2-LABEL: 'zext_v8i16_to_v8i32' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i16>, <8 x i16>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = zext <8 x i16> %1 to <8 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, <8 x i32>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: zext_v8i16_to_v8i32 -; SSE41: cost of 2 {{.*}} zext +; SSE41-LABEL: 'zext_v8i16_to_v8i32' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i16>, <8 x i16>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <8 x i16> %1 to <8 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, <8 x i32>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <8 x i16>, <8 x i16>* %a %2 = zext <8 x i16> %1 to <8 x i32> @@ -120,11 +175,17 @@ define void @zext_v8i16_to_v8i32(<8 x i16>* %a) { } define void @sext_v8i16_to_v8i32(<8 x i16>* %a) { -; SSE2: sext_v8i16_to_v8i32 -; SSE2: cost of 4 {{.*}} sext +; SSE2-LABEL: 'sext_v8i16_to_v8i32' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i16>, <8 x i16>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = sext <8 x i16> %1 to <8 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, <8 x i32>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: sext_v8i16_to_v8i32 -; SSE41: cost of 2 {{.*}} sext +; SSE41-LABEL: 'sext_v8i16_to_v8i32' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i16>, <8 x i16>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <8 x i16> %1 to <8 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, <8 x i32>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <8 x i16>, <8 x i16>* %a %2 = sext <8 x i16> %1 to <8 x i32> @@ -133,11 +194,11 @@ define void @sext_v8i16_to_v8i32(<8 x i16>* %a) { } define void @zext_v4i16_to_v4i32(<4 x i16>* %a) { -; SSE2: zext_v4i16_to_v4i32 -; SSE2: cost of 1 {{.*}} zext -; -; SSE41: zext_v4i16_to_v4i32 -; SSE41: cost of 1 {{.*}} zext +; CHECK-LABEL: 'zext_v4i16_to_v4i32' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, <4 x i16>* %a +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = zext <4 x i16> %1 to <4 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, <4 x i32>* undef, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i16>, <4 x i16>* %a %2 = zext <4 x i16> %1 to <4 x i32> @@ -146,11 +207,17 @@ define void @zext_v4i16_to_v4i32(<4 x i16>* %a) { } define void @sext_v4i16_to_v4i32(<4 x i16>* %a) { -; SSE2: sext_v4i16_to_v4i32 -; SSE2: cost of 2 {{.*}} sext +; SSE2-LABEL: 'sext_v4i16_to_v4i32' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, <4 x i16>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <4 x i16> %1 to <4 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, <4 x i32>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: sext_v4i16_to_v4i32 -; SSE41: cost of 1 {{.*}} sext +; SSE41-LABEL: 'sext_v4i16_to_v4i32' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, <4 x i16>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = sext <4 x i16> %1 to <4 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, <4 x i32>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i16>, <4 x i16>* %a %2 = sext <4 x i16> %1 to <4 x i32> @@ -159,11 +226,17 @@ define void @sext_v4i16_to_v4i32(<4 x i16>* %a) { } define void @zext_v16i8_to_v16i32(<16 x i8>* %a) { -; SSE2: zext_v16i8_to_v16i32 -; SSE2: cost of 9 {{.*}} zext +; SSE2-LABEL: 'zext_v16i8_to_v16i32' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, <16 x i8>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %2 = zext <16 x i8> %1 to <16 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, <16 x i32>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: zext_v16i8_to_v16i32 -; SSE41: cost of 4 {{.*}} zext +; SSE41-LABEL: 'zext_v16i8_to_v16i32' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, <16 x i8>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = zext <16 x i8> %1 to <16 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, <16 x i32>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <16 x i8>, <16 x i8>* %a %2 = zext <16 x i8> %1 to <16 x i32> @@ -172,11 +245,17 @@ define void @zext_v16i8_to_v16i32(<16 x i8>* %a) { } define void @sext_v16i8_to_v16i32(<16 x i8>* %a) { -; SSE2: sext_v16i8_to_v16i32 -; SSE2: cost of 12 {{.*}} sext +; SSE2-LABEL: 'sext_v16i8_to_v16i32' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, <16 x i8>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %2 = sext <16 x i8> %1 to <16 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, <16 x i32>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: sext_v16i8_to_v16i32 -; SSE41: cost of 4 {{.*}} sext +; SSE41-LABEL: 'sext_v16i8_to_v16i32' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, <16 x i8>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = sext <16 x i8> %1 to <16 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, <16 x i32>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <16 x i8>, <16 x i8>* %a %2 = sext <16 x i8> %1 to <16 x i32> @@ -185,11 +264,17 @@ define void @sext_v16i8_to_v16i32(<16 x i8>* %a) { } define void @zext_v8i8_to_v8i32(<8 x i8>* %a) { -; SSE2: zext_v8i8_to_v8i32 -; SSE2: cost of 6 {{.*}} zext +; SSE2-LABEL: 'zext_v8i8_to_v8i32' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, <8 x i8>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %2 = zext <8 x i8> %1 to <8 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, <8 x i32>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: zext_v8i8_to_v8i32 -; SSE41: cost of 2 {{.*}} zext +; SSE41-LABEL: 'zext_v8i8_to_v8i32' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, <8 x i8>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <8 x i8> %1 to <8 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, <8 x i32>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <8 x i8>, <8 x i8>* %a %2 = zext <8 x i8> %1 to <8 x i32> @@ -198,11 +283,17 @@ define void @zext_v8i8_to_v8i32(<8 x i8>* %a) { } define void @sext_v8i8_to_v8i32(<8 x i8>* %a) { -; SSE2: sext_v8i8_to_v8i32 -; SSE2: cost of 6 {{.*}} sext +; SSE2-LABEL: 'sext_v8i8_to_v8i32' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, <8 x i8>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %2 = sext <8 x i8> %1 to <8 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, <8 x i32>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: sext_v8i8_to_v8i32 -; SSE41: cost of 2 {{.*}} sext +; SSE41-LABEL: 'sext_v8i8_to_v8i32' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, <8 x i8>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <8 x i8> %1 to <8 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, <8 x i32>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <8 x i8>, <8 x i8>* %a %2 = sext <8 x i8> %1 to <8 x i32> @@ -211,11 +302,17 @@ define void @sext_v8i8_to_v8i32(<8 x i8>* %a) { } define void @zext_v4i8_to_v4i32(<4 x i8>* %a) { -; SSE2: zext_v4i8_to_v4i32 -; SSE2: cost of 2 {{.*}} zext +; SSE2-LABEL: 'zext_v4i8_to_v4i32' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, <4 x i8>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <4 x i8> %1 to <4 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, <4 x i32>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: zext_v4i8_to_v4i32 -; SSE41: cost of 1 {{.*}} zext +; SSE41-LABEL: 'zext_v4i8_to_v4i32' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, <4 x i8>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = zext <4 x i8> %1 to <4 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, <4 x i32>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i8>, <4 x i8>* %a %2 = zext <4 x i8> %1 to <4 x i32> @@ -224,11 +321,17 @@ define void @zext_v4i8_to_v4i32(<4 x i8>* %a) { } define void @sext_v4i8_to_v4i32(<4 x i8>* %a) { -; SSE2: sext_v4i8_to_v4i32 -; SSE2: cost of 3 {{.*}} sext +; SSE2-LABEL: 'sext_v4i8_to_v4i32' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, <4 x i8>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = sext <4 x i8> %1 to <4 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, <4 x i32>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: sext_v4i8_to_v4i32 -; SSE41: cost of 1 {{.*}} sext +; SSE41-LABEL: 'sext_v4i8_to_v4i32' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, <4 x i8>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = sext <4 x i8> %1 to <4 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, <4 x i32>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i8>, <4 x i8>* %a %2 = sext <4 x i8> %1 to <4 x i32> @@ -237,11 +340,17 @@ define void @sext_v4i8_to_v4i32(<4 x i8>* %a) { } define void @zext_v16i8_to_v16i16(<16 x i8>* %a) { -; SSE2: zext_v16i8_to_v16i16 -; SSE2: cost of 3 {{.*}} zext +; SSE2-LABEL: 'zext_v16i8_to_v16i16' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, <16 x i8>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = zext <16 x i8> %1 to <16 x i16> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> %2, <16 x i16>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: zext_v16i8_to_v16i16 -; SSE41: cost of 2 {{.*}} zext +; SSE41-LABEL: 'zext_v16i8_to_v16i16' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, <16 x i8>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <16 x i8> %1 to <16 x i16> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> %2, <16 x i16>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <16 x i8>, <16 x i8>* %a %2 = zext <16 x i8> %1 to <16 x i16> @@ -250,11 +359,17 @@ define void @zext_v16i8_to_v16i16(<16 x i8>* %a) { } define void @sext_v16i8_to_v16i16(<16 x i8>* %a) { -; SSE2: sext_v16i8_to_v16i16 -; SSE2: cost of 4 {{.*}} sext +; SSE2-LABEL: 'sext_v16i8_to_v16i16' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, <16 x i8>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = sext <16 x i8> %1 to <16 x i16> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> %2, <16 x i16>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: sext_v16i8_to_v16i16 -; SSE41: cost of 2 {{.*}} sext +; SSE41-LABEL: 'sext_v16i8_to_v16i16' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, <16 x i8>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <16 x i8> %1 to <16 x i16> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> %2, <16 x i16>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <16 x i8>, <16 x i8>* %a %2 = sext <16 x i8> %1 to <16 x i16> @@ -263,11 +378,11 @@ define void @sext_v16i8_to_v16i16(<16 x i8>* %a) { } define void @zext_v8i8_to_v8i16(<8 x i8>* %a) { -; SSE2: zext_v8i8_to_v8i16 -; SSE2: cost of 1 {{.*}} zext -; -; SSE41: zext_v8i8_to_v8i16 -; SSE41: cost of 1 {{.*}} zext +; CHECK-LABEL: 'zext_v8i8_to_v8i16' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, <8 x i8>* %a +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = zext <8 x i8> %1 to <8 x i16> +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> %2, <8 x i16>* undef, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <8 x i8>, <8 x i8>* %a %2 = zext <8 x i8> %1 to <8 x i16> @@ -276,11 +391,17 @@ define void @zext_v8i8_to_v8i16(<8 x i8>* %a) { } define void @sext_v8i8_to_v8i16(<8 x i8>* %a) { -; SSE2: sext_v8i8_to_v8i16 -; SSE2: cost of 2 {{.*}} sext +; SSE2-LABEL: 'sext_v8i8_to_v8i16' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, <8 x i8>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <8 x i8> %1 to <8 x i16> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> %2, <8 x i16>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: sext_v8i8_to_v8i16 -; SSE41: cost of 1 {{.*}} sext +; SSE41-LABEL: 'sext_v8i8_to_v8i16' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, <8 x i8>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = sext <8 x i8> %1 to <8 x i16> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> %2, <8 x i16>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <8 x i8>, <8 x i8>* %a %2 = sext <8 x i8> %1 to <8 x i16> @@ -289,11 +410,11 @@ define void @sext_v8i8_to_v8i16(<8 x i8>* %a) { } define void @zext_v4i8_to_v4i16(<4 x i8>* %a) { -; SSE2: zext_v4i8_to_v4i16 -; SSE2: cost of 1 {{.*}} zext -; -; SSE41: zext_v4i8_to_v4i16 -; SSE41: cost of 1 {{.*}} zext +; CHECK-LABEL: 'zext_v4i8_to_v4i16' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, <4 x i8>* %a +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = zext <4 x i8> %1 to <4 x i16> +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> %2, <4 x i16>* undef, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i8>, <4 x i8>* %a %2 = zext <4 x i8> %1 to <4 x i16> @@ -302,11 +423,17 @@ define void @zext_v4i8_to_v4i16(<4 x i8>* %a) { } define void @sext_v4i8_to_v4i16(<4 x i8>* %a) { -; SSE2: sext_v4i8_to_v4i16 -; SSE2: cost of 6 {{.*}} sext +; SSE2-LABEL: 'sext_v4i8_to_v4i16' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, <4 x i8>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %2 = sext <4 x i8> %1 to <4 x i16> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> %2, <4 x i16>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: sext_v4i8_to_v4i16 -; SSE41: cost of 2 {{.*}} sext +; SSE41-LABEL: 'sext_v4i8_to_v4i16' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, <4 x i8>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <4 x i8> %1 to <4 x i16> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> %2, <4 x i16>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i8>, <4 x i8>* %a %2 = sext <4 x i8> %1 to <4 x i16> @@ -315,11 +442,17 @@ define void @sext_v4i8_to_v4i16(<4 x i8>* %a) { } define void @truncate_v16i32_to_v16i16(<16 x i32>* %a) { -; SSE2: truncate_v16i32_to_v16i16 -; SSE2: cost of 10 {{.*}} trunc +; SSE2-LABEL: 'truncate_v16i32_to_v16i16' +; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = load <16 x i32>, <16 x i32>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %2 = trunc <16 x i32> %1 to <16 x i16> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> %2, <16 x i16>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: truncate_v16i32_to_v16i16 -; SSE41: cost of 6 {{.*}} trunc +; SSE41-LABEL: 'truncate_v16i32_to_v16i16' +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = load <16 x i32>, <16 x i32>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %2 = trunc <16 x i32> %1 to <16 x i16> +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> %2, <16 x i16>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <16 x i32>, <16 x i32>* %a %2 = trunc <16 x i32> %1 to <16 x i16> @@ -328,11 +461,17 @@ define void @truncate_v16i32_to_v16i16(<16 x i32>* %a) { } define void @truncate_v8i32_to_v8i16(<8 x i32>* %a) { -; SSE2: truncate_v8i32_to_v8i16 -; SSE2: cost of 5 {{.*}} trunc +; SSE2-LABEL: 'truncate_v8i32_to_v8i16' +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <8 x i32>, <8 x i32>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %2 = trunc <8 x i32> %1 to <8 x i16> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> %2, <8 x i16>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: truncate_v8i32_to_v8i16 -; SSE41: cost of 3 {{.*}} trunc +; SSE41-LABEL: 'truncate_v8i32_to_v8i16' +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <8 x i32>, <8 x i32>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = trunc <8 x i32> %1 to <8 x i16> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> %2, <8 x i16>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <8 x i32>, <8 x i32>* %a %2 = trunc <8 x i32> %1 to <8 x i16> @@ -341,11 +480,17 @@ define void @truncate_v8i32_to_v8i16(<8 x i32>* %a) { } define void @truncate_v4i32_to_v4i16(<4 x i32>* %a) { -; SSE2: truncate_v4i32_to_v4i16 -; SSE2: cost of 3 {{.*}} trunc +; SSE2-LABEL: 'truncate_v4i32_to_v4i16' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, <4 x i32>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = trunc <4 x i32> %1 to <4 x i16> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> %2, <4 x i16>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: truncate_v4i32_to_v4i16 -; SSE41: cost of 1 {{.*}} trunc +; SSE41-LABEL: 'truncate_v4i32_to_v4i16' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, <4 x i32>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = trunc <4 x i32> %1 to <4 x i16> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> %2, <4 x i16>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i32>, <4 x i32>* %a %2 = trunc <4 x i32> %1 to <4 x i16> @@ -354,11 +499,11 @@ define void @truncate_v4i32_to_v4i16(<4 x i32>* %a) { } define void @truncate_v16i32_to_v16i8(<16 x i32>* %a) { -; SSE2: truncate_v16i32_to_v16i8 -; SSE2: cost of 7 {{.*}} trunc -; -; SSE41: truncate_v16i32_to_v16i8 -; SSE41: cost of 7 {{.*}} trunc +; CHECK-LABEL: 'truncate_v16i32_to_v16i8' +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = load <16 x i32>, <16 x i32>* %a +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %2 = trunc <16 x i32> %1 to <16 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> %2, <16 x i8>* undef, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <16 x i32>, <16 x i32>* %a %2 = trunc <16 x i32> %1 to <16 x i8> @@ -367,11 +512,17 @@ define void @truncate_v16i32_to_v16i8(<16 x i32>* %a) { } define void @truncate_v8i32_to_v8i8(<8 x i32>* %a) { -; SSE2: truncate_v8i32_to_v8i8 -; SSE2: cost of 4 {{.*}} trunc +; SSE2-LABEL: 'truncate_v8i32_to_v8i8' +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <8 x i32>, <8 x i32>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = trunc <8 x i32> %1 to <8 x i8> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i8> %2, <8 x i8>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: truncate_v8i32_to_v8i8 -; SSE41: cost of 3 {{.*}} trunc +; SSE41-LABEL: 'truncate_v8i32_to_v8i8' +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <8 x i32>, <8 x i32>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = trunc <8 x i32> %1 to <8 x i8> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i8> %2, <8 x i8>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <8 x i32>, <8 x i32>* %a %2 = trunc <8 x i32> %1 to <8 x i8> @@ -380,11 +531,17 @@ define void @truncate_v8i32_to_v8i8(<8 x i32>* %a) { } define void @truncate_v4i32_to_v4i8(<4 x i32>* %a) { -; SSE2: truncate_v4i32_to_v4i8 -; SSE2: cost of 3 {{.*}} trunc +; SSE2-LABEL: 'truncate_v4i32_to_v4i8' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, <4 x i32>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = trunc <4 x i32> %1 to <4 x i8> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> %2, <4 x i8>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: truncate_v4i32_to_v4i8 -; SSE41: cost of 1 {{.*}} trunc +; SSE41-LABEL: 'truncate_v4i32_to_v4i8' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, <4 x i32>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = trunc <4 x i32> %1 to <4 x i8> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> %2, <4 x i8>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i32>, <4 x i32>* %a %2 = trunc <4 x i32> %1 to <4 x i8> @@ -393,11 +550,11 @@ define void @truncate_v4i32_to_v4i8(<4 x i32>* %a) { } define void @truncate_v16i16_to_v16i8(<16 x i16>* %a) { -; SSE2: truncate_v16i16_to_v16i8 -; SSE2: cost of 3 {{.*}} trunc -; -; SSE41: truncate_v16i16_to_v16i8 -; SSE41: cost of 3 {{.*}} trunc +; CHECK-LABEL: 'truncate_v16i16_to_v16i8' +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <16 x i16>, <16 x i16>* %a +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = trunc <16 x i16> %1 to <16 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> %2, <16 x i8>* undef, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <16 x i16>, <16 x i16>* %a %2 = trunc <16 x i16> %1 to <16 x i8> @@ -406,11 +563,17 @@ define void @truncate_v16i16_to_v16i8(<16 x i16>* %a) { } define void @truncate_v8i16_to_v8i8(<8 x i16>* %a) { -; SSE2: truncate_v8i16_to_v8i8 -; SSE2: cost of 2 {{.*}} trunc +; SSE2-LABEL: 'truncate_v8i16_to_v8i8' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i16>, <8 x i16>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = trunc <8 x i16> %1 to <8 x i8> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i8> %2, <8 x i8>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: truncate_v8i16_to_v8i8 -; SSE41: cost of 1 {{.*}} trunc +; SSE41-LABEL: 'truncate_v8i16_to_v8i8' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i16>, <8 x i16>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = trunc <8 x i16> %1 to <8 x i8> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i8> %2, <8 x i8>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <8 x i16>, <8 x i16>* %a %2 = trunc <8 x i16> %1 to <8 x i8> @@ -419,11 +582,17 @@ define void @truncate_v8i16_to_v8i8(<8 x i16>* %a) { } define void @truncate_v4i16_to_v4i8(<4 x i16>* %a) { -; SSE2: truncate_v4i16_to_v4i8 -; SSE2: cost of 4 {{.*}} trunc +; SSE2-LABEL: 'truncate_v4i16_to_v4i8' +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, <4 x i16>* %a +; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = trunc <4 x i16> %1 to <4 x i8> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> %2, <4 x i8>* undef, align 4 +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; -; SSE41: truncate_v4i16_to_v4i8 -; SSE41: cost of 2 {{.*}} trunc +; SSE41-LABEL: 'truncate_v4i16_to_v4i8' +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, <4 x i16>* %a +; SSE41-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = trunc <4 x i16> %1 to <4 x i8> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> %2, <4 x i8>* undef, align 4 +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %1 = load <4 x i16>, <4 x i16>* %a %2 = trunc <4 x i16> %1 to <4 x i8>