From ad768585ff488cf01588b2d0caa1f95260031cdc Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 6 Apr 2018 15:12:36 +0000 Subject: [PATCH] [CostModel][X86] Regenerate int<->fp cost tests with update_analyze_test_checks.py llvm-svn: 329398 --- llvm/test/Analysis/CostModel/X86/fptosi.ll | 389 ++++++++++++++------------- llvm/test/Analysis/CostModel/X86/fptoui.ll | 411 +++++++++++++++-------------- llvm/test/Analysis/CostModel/X86/sitofp.ll | 377 +++++++++++++------------- llvm/test/Analysis/CostModel/X86/uitofp.ll | 384 ++++++++++++++------------- 4 files changed, 798 insertions(+), 763 deletions(-) diff --git a/llvm/test/Analysis/CostModel/X86/fptosi.ll b/llvm/test/Analysis/CostModel/X86/fptosi.ll index dc0a041..ce08cf0 100644 --- a/llvm/test/Analysis/CostModel/X86/fptosi.ll +++ b/llvm/test/Analysis/CostModel/X86/fptosi.ll @@ -1,261 +1,258 @@ -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+sse2 -cost-model -analyze < %s | FileCheck --check-prefix=SSE --check-prefix=SSE2 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+sse4.2 -cost-model -analyze < %s | FileCheck --check-prefix=SSE --check-prefix=SSE42 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx -cost-model -analyze < %s | FileCheck --check-prefix=AVX --check-prefix=AVX1 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx2 -cost-model -analyze < %s | FileCheck --check-prefix=AVX --check-prefix=AVX2 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx512f -cost-model -analyze < %s | FileCheck --check-prefix=AVX512 --check-prefix=AVX512F %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx512f,+avx512dq -cost-model -analyze < %s | FileCheck --check-prefix=AVX512 --check-prefix=AVX512DQ %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,SSE,SSE2 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+sse4.2 | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX2 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx512f | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512DQ -; CHECK-LABEL: 'fptosi_double_i64' define i32 @fptosi_double_i64(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I64 = fptosi - ; SSE42: cost of 1 {{.*}} %I64 = fptosi - ; AVX1: cost of 1 {{.*}} %I64 = fptosi - ; AVX2: cost of 1 {{.*}} %I64 = fptosi - ; AVX512: cost of 1 {{.*}} %I64 = fptosi +; SSE-LABEL: 'fptosi_double_i64' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi double undef to i64 +; SSE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x double> undef to <2 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V8I64 = fptosi <8 x double> undef to <8 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptosi_double_i64' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi double undef to i64 +; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x double> undef to <2 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V8I64 = fptosi <8 x double> undef to <8 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'fptosi_double_i64' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi double undef to i64 +; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x double> undef to <2 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8I64 = fptosi <8 x double> undef to <8 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'fptosi_double_i64' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi double undef to i64 +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = fptosi <2 x double> undef to <2 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = fptosi <8 x double> undef to <8 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I64 = fptosi double undef to i64 - ; SSE2: cost of 6 {{.*}} %V2I64 = fptosi - ; SSE42: cost of 6 {{.*}} %V2I64 = fptosi - ; AVX1: cost of 6 {{.*}} %V2I64 = fptosi - ; AVX2: cost of 6 {{.*}} %V2I64 = fptosi - ; AVX512F: cost of 6 {{.*}} %V2I64 = fptosi - ; AVX512DQ: cost of 1 {{.*}} %V2I64 = fptosi %V2I64 = fptosi <2 x double> undef to <2 x i64> - ; SSE2: cost of 13 {{.*}} %V4I64 = fptosi - ; SSE42: cost of 13 {{.*}} %V4I64 = fptosi - ; AVX1: cost of 12 {{.*}} %V4I64 = fptosi - ; AVX2: cost of 12 {{.*}} %V4I64 = fptosi - ; AVX512F: cost of 12 {{.*}} %V4I64 = fptosi - ; AVX512DQ: cost of 1 {{.*}} %V4I64 = fptosi %V4I64 = fptosi <4 x double> undef to <4 x i64> - ; SSE2: cost of 27 {{.*}} %V8I64 = fptosi - ; SSE42: cost of 27 {{.*}} %V8I64 = fptosi - ; AVX1: cost of 25 {{.*}} %V8I64 = fptosi - ; AVX2: cost of 25 {{.*}} %V8I64 = fptosi - ; AVX512F: cost of 24 {{.*}} %V8I64 = fptosi - ; AVX512DQ: cost of 1 {{.*}} %V8I64 = fptosi %V8I64 = fptosi <8 x double> undef to <8 x i64> - ret i32 undef } -; CHECK-LABEL: 'fptosi_double_i32' define i32 @fptosi_double_i32(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I32 = fptosi - ; SSE42: cost of 1 {{.*}} %I32 = fptosi - ; AVX1: cost of 1 {{.*}} %I32 = fptosi - ; AVX2: cost of 1 {{.*}} %I32 = fptosi - ; AVX512: cost of 1 {{.*}} %I32 = fptosi +; SSE-LABEL: 'fptosi_double_i32' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi double undef to i32 +; SSE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I32 = fptosi <2 x double> undef to <2 x i32> +; SSE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V4I32 = fptosi <4 x double> undef to <4 x i32> +; SSE-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V8I32 = fptosi <8 x double> undef to <8 x i32> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptosi_double_i32' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi double undef to i32 +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I32 = fptosi <2 x double> undef to <2 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x double> undef to <4 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I32 = fptosi <8 x double> undef to <8 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'fptosi_double_i32' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi double undef to i32 +; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I32 = fptosi <2 x double> undef to <2 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x double> undef to <4 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptosi <8 x double> undef to <8 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I32 = fptosi double undef to i32 - ; SSE2: cost of 3 {{.*}} %V2I32 = fptosi - ; SSE42: cost of 3 {{.*}} %V2I32 = fptosi - ; AVX1: cost of 3 {{.*}} %V2I32 = fptosi - ; AVX2: cost of 3 {{.*}} %V2I32 = fptosi - ; AVX512: cost of 3 {{.*}} %V2I32 = fptosi %V2I32 = fptosi <2 x double> undef to <2 x i32> - ; SSE2: cost of 7 {{.*}} %V4I32 = fptosi - ; SSE42: cost of 7 {{.*}} %V4I32 = fptosi - ; AVX1: cost of 1 {{.*}} %V4I32 = fptosi - ; AVX2: cost of 1 {{.*}} %V4I32 = fptosi - ; AVX512: cost of 1 {{.*}} %V4I32 = fptosi %V4I32 = fptosi <4 x double> undef to <4 x i32> - ; SSE2: cost of 15 {{.*}} %V8I32 = fptosi - ; SSE42: cost of 15 {{.*}} %V8I32 = fptosi - ; AVX1: cost of 3 {{.*}} %V8I32 = fptosi - ; AVX2: cost of 3 {{.*}} %V8I32 = fptosi - ; AVX512: cost of 1 {{.*}} %V8I32 = fptosi %V8I32 = fptosi <8 x double> undef to <8 x i32> - ret i32 undef } -; CHECK-LABEL: 'fptosi_double_i16' define i32 @fptosi_double_i16(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I16 = fptosi - ; SSE42: cost of 1 {{.*}} %I16 = fptosi - ; AVX1: cost of 1 {{.*}} %I16 = fptosi - ; AVX2: cost of 1 {{.*}} %I16 = fptosi - ; AVX512: cost of 1 {{.*}} %I16 = fptosi +; SSE-LABEL: 'fptosi_double_i16' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi double undef to i16 +; SSE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I16 = fptosi <2 x double> undef to <2 x i16> +; SSE-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V4I16 = fptosi <4 x double> undef to <4 x i16> +; SSE-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V8I16 = fptosi <8 x double> undef to <8 x i16> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptosi_double_i16' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi double undef to i16 +; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I16 = fptosi <2 x double> undef to <2 x i16> +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptosi <4 x double> undef to <4 x i16> +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I16 = fptosi <8 x double> undef to <8 x i16> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'fptosi_double_i16' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi double undef to i16 +; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I16 = fptosi <2 x double> undef to <2 x i16> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptosi <4 x double> undef to <4 x i16> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = fptosi <8 x double> undef to <8 x i16> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'fptosi_double_i16' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi double undef to i16 +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptosi <2 x double> undef to <2 x i16> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptosi <4 x double> undef to <4 x i16> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = fptosi <8 x double> undef to <8 x i16> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I16 = fptosi double undef to i16 - ; SSE2: cost of 6 {{.*}} %V2I16 = fptosi - ; SSE42: cost of 6 {{.*}} %V2I16 = fptosi - ; AVX1: cost of 6 {{.*}} %V2I16 = fptosi - ; AVX2: cost of 6 {{.*}} %V2I16 = fptosi - ; AVX512F: cost of 6 {{.*}} %V2I16 = fptosi - ; AVX512DQ: cost of 1 {{.*}} %V2I16 = fptosi %V2I16 = fptosi <2 x double> undef to <2 x i16> - ; SSE2: cost of 13 {{.*}} %V4I16 = fptosi - ; SSE42: cost of 13 {{.*}} %V4I16 = fptosi - ; AVX1: cost of 1 {{.*}} %V4I16 = fptosi - ; AVX2: cost of 1 {{.*}} %V4I16 = fptosi - ; AVX512: cost of 1 {{.*}} %V4I16 = fptosi %V4I16 = fptosi <4 x double> undef to <4 x i16> - ; SSE2: cost of 27 {{.*}} %V8I16 = fptosi - ; SSE42: cost of 27 {{.*}} %V8I16 = fptosi - ; AVX1: cost of 3 {{.*}} %V8I16 = fptosi - ; AVX2: cost of 3 {{.*}} %V8I16 = fptosi - ; AVX512: cost of 1 {{.*}} %V8I16 = fptosi %V8I16 = fptosi <8 x double> undef to <8 x i16> - ret i32 undef } -; CHECK-LABEL: 'fptosi_double_i8' define i32 @fptosi_double_i8(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I8 = fptosi - ; SSE42: cost of 1 {{.*}} %I8 = fptosi - ; AVX1: cost of 1 {{.*}} %I8 = fptosi - ; AVX2: cost of 1 {{.*}} %I8 = fptosi - ; AVX512: cost of 1 {{.*}} %I8 = fptosi +; SSE-LABEL: 'fptosi_double_i8' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 +; SSE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> +; SSE-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> +; SSE-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptosi_double_i8' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 +; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'fptosi_double_i8' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 +; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'fptosi_double_i8' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I8 = fptosi double undef to i8 - ; SSE2: cost of 6 {{.*}} %V2I8 = fptosi - ; SSE42: cost of 6 {{.*}} %V2I8 = fptosi - ; AVX1: cost of 6 {{.*}} %V2I8 = fptosi - ; AVX2: cost of 6 {{.*}} %V2I8 = fptosi - ; AVX512F: cost of 6 {{.*}} %V2I8 = fptosi - ; AVX512DQ: cost of 1 {{.*}} %V2I8 = fptosi %V2I8 = fptosi <2 x double> undef to <2 x i8> - ; SSE2: cost of 13 {{.*}} %V4I8 = fptosi - ; SSE42: cost of 13 {{.*}} %V4I8 = fptosi - ; AVX1: cost of 1 {{.*}} %V4I8 = fptosi - ; AVX2: cost of 1 {{.*}} %V4I8 = fptosi - ; AVX512: cost of 1 {{.*}} %V4I8 = fptosi %V4I8 = fptosi <4 x double> undef to <4 x i8> - ; SSE2: cost of 27 {{.*}} %V8I8 = fptosi - ; SSE42: cost of 27 {{.*}} %V8I8 = fptosi - ; AVX1: cost of 3 {{.*}} %V8I8 = fptosi - ; AVX2: cost of 3 {{.*}} %V8I8 = fptosi - ; AVX512: cost of 1 {{.*}} %V8I8 = fptosi %V8I8 = fptosi <8 x double> undef to <8 x i8> - ret i32 undef } -; CHECK-LABEL: 'fptosi_float_i64' define i32 @fptosi_float_i64(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I64 = fptosi - ; SSE42: cost of 1 {{.*}} %I64 = fptosi - ; AVX1: cost of 1 {{.*}} %I64 = fptosi - ; AVX2: cost of 1 {{.*}} %I64 = fptosi - ; AVX512: cost of 1 {{.*}} %I64 = fptosi +; SSE-LABEL: 'fptosi_float_i64' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 +; SSE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 55 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptosi_float_i64' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 +; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'fptosi_float_i64' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 +; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 49 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'fptosi_float_i64' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I64 = fptosi float undef to i64 - ; SSE2: cost of 6 {{.*}} %V2I64 = fptosi - ; SSE42: cost of 6 {{.*}} %V2I64 = fptosi - ; AVX1: cost of 6 {{.*}} %V2I64 = fptosi - ; AVX2: cost of 6 {{.*}} %V2I64 = fptosi - ; AVX512F: cost of 6 {{.*}} %V2I64 = fptosi - ; AVX512DQ: cost of 1 {{.*}} %V2I64 = fptosi %V2I64 = fptosi <2 x float> undef to <2 x i64> - ; SSE2: cost of 13 {{.*}} %V4I64 = fptosi - ; SSE42: cost of 13 {{.*}} %V4I64 = fptosi - ; AVX1: cost of 12 {{.*}} %V4I64 = fptosi - ; AVX2: cost of 12 {{.*}} %V4I64 = fptosi - ; AVX512F: cost of 12 {{.*}} %V4I64 = fptosi - ; AVX512DQ: cost of 1 {{.*}} %V4I64 = fptosi %V4I64 = fptosi <4 x float> undef to <4 x i64> - ; SSE2: cost of 27 {{.*}} %V8I64 = fptosi - ; SSE42: cost of 27 {{.*}} %V8I64 = fptosi - ; AVX1: cost of 25 {{.*}} %V8I64 = fptosi - ; AVX2: cost of 25 {{.*}} %V8I64 = fptosi - ; AVX512F: cost of 24 {{.*}} %V8I64 = fptosi - ; AVX512DQ: cost of 1 {{.*}} %V8I64 = fptosi %V8I64 = fptosi <8 x float> undef to <8 x i64> - ; SSE2: cost of 55 {{.*}} %V16I64 = fptosi - ; SSE42: cost of 55 {{.*}} %V16I64 = fptosi - ; AVX1: cost of 51 {{.*}} %V16I64 = fptosi - ; AVX2: cost of 51 {{.*}} %V16I64 = fptosi - ; AVX512F: cost of 49 {{.*}} %V16I64 = fptosi - ; AVX512DQ: cost of 3 {{.*}} %V16I64 = fptosi %V16I64 = fptosi <16 x float> undef to <16 x i64> - ret i32 undef } -; CHECK-LABEL: 'fptosi_float_i32' define i32 @fptosi_float_i32(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I32 = fptosi - ; SSE42: cost of 1 {{.*}} %I32 = fptosi - ; AVX1: cost of 1 {{.*}} %I32 = fptosi - ; AVX2: cost of 1 {{.*}} %I32 = fptosi - ; AVX512: cost of 1 {{.*}} %I32 = fptosi +; CHECK-LABEL: 'fptosi_float_i32' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi float undef to i32 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x float> undef to <4 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptosi <8 x float> undef to <8 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = fptosi <16 x float> undef to <16 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I32 = fptosi float undef to i32 - ; SSE2: cost of 1 {{.*}} %V4I32 = fptosi - ; SSE42: cost of 1 {{.*}} %V4I32 = fptosi - ; AVX1: cost of 1 {{.*}} %V4I32 = fptosi - ; AVX2: cost of 1 {{.*}} %V4I32 = fptosi - ; AVX512: cost of 1 {{.*}} %V4I32 = fptosi %V4I32 = fptosi <4 x float> undef to <4 x i32> - ; SSE2: cost of 1 {{.*}} %V8I32 = fptosi - ; SSE42: cost of 1 {{.*}} %V8I32 = fptosi - ; AVX1: cost of 1 {{.*}} %V8I32 = fptosi - ; AVX2: cost of 1 {{.*}} %V8I32 = fptosi - ; AVX512: cost of 1 {{.*}} %V8I32 = fptosi %V8I32 = fptosi <8 x float> undef to <8 x i32> - ; SSE2: cost of 1 {{.*}} %V16I32 = fptosi - ; SSE42: cost of 1 {{.*}} %V16I32 = fptosi - ; AVX1: cost of 1 {{.*}} %V16I32 = fptosi - ; AVX2: cost of 1 {{.*}} %V16I32 = fptosi - ; AVX512: cost of 1 {{.*}} %V16I32 = fptosi %V16I32 = fptosi <16 x float> undef to <16 x i32> - ret i32 undef } -; CHECK-LABEL: 'fptosi_float_i16' define i32 @fptosi_float_i16(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I16 = fptosi - ; SSE42: cost of 1 {{.*}} %I16 = fptosi - ; AVX1: cost of 1 {{.*}} %I16 = fptosi - ; AVX2: cost of 1 {{.*}} %I16 = fptosi - ; AVX512: cost of 1 {{.*}} %I16 = fptosi +; SSE-LABEL: 'fptosi_float_i16' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi float undef to i16 +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptosi <4 x float> undef to <4 x i16> +; SSE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I16 = fptosi <8 x float> undef to <8 x i16> +; SSE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V16I16 = fptosi <16 x float> undef to <16 x i16> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptosi_float_i16' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi float undef to i16 +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptosi <4 x float> undef to <4 x i16> +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = fptosi <8 x float> undef to <8 x i16> +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I16 = fptosi <16 x float> undef to <16 x i16> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'fptosi_float_i16' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi float undef to i16 +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptosi <4 x float> undef to <4 x i16> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = fptosi <8 x float> undef to <8 x i16> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = fptosi <16 x float> undef to <16 x i16> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I16 = fptosi float undef to i16 - ; SSE2: cost of 1 {{.*}} %V4I16 = fptosi - ; SSE42: cost of 1 {{.*}} %V4I16 = fptosi - ; AVX1: cost of 1 {{.*}} %V4I16 = fptosi - ; AVX2: cost of 1 {{.*}} %V4I16 = fptosi - ; AVX512: cost of 1 {{.*}} %V4I16 = fptosi %V4I16 = fptosi <4 x float> undef to <4 x i16> - ; SSE2: cost of 3 {{.*}} %V8I16 = fptosi - ; SSE42: cost of 3 {{.*}} %V8I16 = fptosi - ; AVX1: cost of 1 {{.*}} %V8I16 = fptosi - ; AVX2: cost of 1 {{.*}} %V8I16 = fptosi - ; AVX512: cost of 1 {{.*}} %V8I16 = fptosi %V8I16 = fptosi <8 x float> undef to <8 x i16> - ; SSE2: cost of 7 {{.*}} %V16I16 = fptosi - ; SSE42: cost of 7 {{.*}} %V16I16 = fptosi - ; AVX1: cost of 3 {{.*}} %V16I16 = fptosi - ; AVX2: cost of 3 {{.*}} %V16I16 = fptosi - ; AVX512: cost of 1 {{.*}} %V16I16 = fptosi %V16I16 = fptosi <16 x float> undef to <16 x i16> - ret i32 undef } -; CHECK-LABEL: 'fptosi_float_i8' define i32 @fptosi_float_i8(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I8 = fptosi - ; SSE42: cost of 1 {{.*}} %I8 = fptosi - ; AVX1: cost of 1 {{.*}} %I8 = fptosi - ; AVX2: cost of 1 {{.*}} %I8 = fptosi - ; AVX512: cost of 1 {{.*}} %I8 = fptosi +; SSE-LABEL: 'fptosi_float_i8' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi float undef to i8 +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> +; SSE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> +; SSE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptosi_float_i8' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi float undef to i8 +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> +; AVX-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> +; AVX-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'fptosi_float_i8' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi float undef to i8 +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> +; AVX512-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I8 = fptosi float undef to i8 - ; SSE2: cost of 1 {{.*}} %V4I8 = fptosi - ; SSE42: cost of 1 {{.*}} %V4I8 = fptosi - ; AVX1: cost of 1 {{.*}} %V4I8 = fptosi - ; AVX2: cost of 1 {{.*}} %V4I8 = fptosi - ; AVX512: cost of 1 {{.*}} %V4I8 = fptosi %V4I8 = fptosi <4 x float> undef to <4 x i8> - ; SSE2: cost of 3 {{.*}} %V8I8 = fptosi - ; SSE42: cost of 3 {{.*}} %V8I8 = fptosi - ; AVX1: cost of 7 {{.*}} %V8I8 = fptosi - ; AVX2: cost of 7 {{.*}} %V8I8 = fptosi - ; AVX512: cost of 7 {{.*}} %V8I8 = fptosi %V8I8 = fptosi <8 x float> undef to <8 x i8> - ; SSE2: cost of 7 {{.*}} %V16I8 = fptosi - ; SSE42: cost of 7 {{.*}} %V16I8 = fptosi - ; AVX1: cost of 15 {{.*}} %V16I8 = fptosi - ; AVX2: cost of 15 {{.*}} %V16I8 = fptosi - ; AVX512: cost of 1 {{.*}} %V16I8 = fptosi %V16I8 = fptosi <16 x float> undef to <16 x i8> - ret i32 undef } diff --git a/llvm/test/Analysis/CostModel/X86/fptoui.ll b/llvm/test/Analysis/CostModel/X86/fptoui.ll index 183ff92..af22f78 100644 --- a/llvm/test/Analysis/CostModel/X86/fptoui.ll +++ b/llvm/test/Analysis/CostModel/X86/fptoui.ll @@ -1,262 +1,279 @@ -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+sse2 -cost-model -analyze < %s | FileCheck --check-prefix=SSE --check-prefix=SSE2 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+sse4.2 -cost-model -analyze < %s | FileCheck --check-prefix=SSE --check-prefix=SSE42 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx -cost-model -analyze < %s | FileCheck --check-prefix=AVX --check-prefix=AVX1 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx2 -cost-model -analyze < %s | FileCheck --check-prefix=AVX --check-prefix=AVX2 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx512f -cost-model -analyze < %s | FileCheck --check-prefix=AVX512 --check-prefix=AVX512F %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx512f,+avx512dq -cost-model -analyze < %s | FileCheck --check-prefix=AVX512 --check-prefix=AVX512DQ %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,SSE,SSE2 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+sse4.2 | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX2 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx512f | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512DQ -; CHECK-LABEL: 'fptoui_double_i64' define i32 @fptoui_double_i64(i32 %arg) { - ; SSE2: cost of 4 {{.*}} %I64 = fptoui - ; SSE42: cost of 4 {{.*}} %I64 = fptoui - ; AVX1: cost of 4 {{.*}} %I64 = fptoui - ; AVX2: cost of 4 {{.*}} %I64 = fptoui - ; AVX512: cost of 1 {{.*}} %I64 = fptoui +; SSE-LABEL: 'fptoui_double_i64' +; SSE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptoui double undef to i64 +; SSE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V2I64 = fptoui <2 x double> undef to <2 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V4I64 = fptoui <4 x double> undef to <4 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %V8I64 = fptoui <8 x double> undef to <8 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptoui_double_i64' +; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptoui double undef to i64 +; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V2I64 = fptoui <2 x double> undef to <2 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V4I64 = fptoui <4 x double> undef to <4 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 49 for instruction: %V8I64 = fptoui <8 x double> undef to <8 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'fptoui_double_i64' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptoui double undef to i64 +; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptoui <2 x double> undef to <2 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I64 = fptoui <4 x double> undef to <4 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8I64 = fptoui <8 x double> undef to <8 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'fptoui_double_i64' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptoui double undef to i64 +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = fptoui <2 x double> undef to <2 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = fptoui <4 x double> undef to <4 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = fptoui <8 x double> undef to <8 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I64 = fptoui double undef to i64 - ; SSE2: cost of 12 {{.*}} %V2I64 = fptoui - ; SSE42: cost of 12 {{.*}} %V2I64 = fptoui - ; AVX1: cost of 12 {{.*}} %V2I64 = fptoui - ; AVX2: cost of 12 {{.*}} %V2I64 = fptoui - ; AVX512F: cost of 6 {{.*}} %V2I64 = fptoui - ; AVX512DQ: cost of 1 {{.*}} %V2I64 = fptoui %V2I64 = fptoui <2 x double> undef to <2 x i64> - ; SSE2: cost of 25 {{.*}} %V4I64 = fptoui - ; SSE42: cost of 25 {{.*}} %V4I64 = fptoui - ; AVX1: cost of 24 {{.*}} %V4I64 = fptoui - ; AVX2: cost of 24 {{.*}} %V4I64 = fptoui - ; AVX512F: cost of 12 {{.*}} %V4I64 = fptoui - ; AVX512DQ: cost of 1 {{.*}} %V4I64 = fptoui %V4I64 = fptoui <4 x double> undef to <4 x i64> - ; SSE2: cost of 51 {{.*}} %V8I64 = fptoui - ; SSE42: cost of 51 {{.*}} %V8I64 = fptoui - ; AVX1: cost of 49 {{.*}} %V8I64 = fptoui - ; AVX2: cost of 49 {{.*}} %V8I64 = fptoui - ; AVX512F: cost of 24 {{.*}} %V8I64 = fptoui - ; AVX512DQ: cost of 1 {{.*}} %V8I64 = fptoui %V8I64 = fptoui <8 x double> undef to <8 x i64> - ret i32 undef } -; CHECK-LABEL: 'fptoui_double_i32' define i32 @fptoui_double_i32(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I32 = fptoui - ; SSE42: cost of 1 {{.*}} %I32 = fptoui - ; AVX1: cost of 1 {{.*}} %I32 = fptoui - ; AVX2: cost of 1 {{.*}} %I32 = fptoui - ; AVX512: cost of 1 {{.*}} %I32 = fptoui +; SSE-LABEL: 'fptoui_double_i32' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui double undef to i32 +; SSE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I32 = fptoui <2 x double> undef to <2 x i32> +; SSE-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32> +; SSE-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V8I32 = fptoui <8 x double> undef to <8 x i32> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptoui_double_i32' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui double undef to i32 +; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I32 = fptoui <2 x double> undef to <2 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %V8I32 = fptoui <8 x double> undef to <8 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'fptoui_double_i32' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui double undef to i32 +; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I32 = fptoui <2 x double> undef to <2 x i32> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptoui <8 x double> undef to <8 x i32> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'fptoui_double_i32' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui double undef to i32 +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptoui <2 x double> undef to <2 x i32> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptoui <8 x double> undef to <8 x i32> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I32 = fptoui double undef to i32 - ; SSE2: cost of 6 {{.*}} %V2I32 = fptoui - ; SSE42: cost of 6 {{.*}} %V2I32 = fptoui - ; AVX1: cost of 6 {{.*}} %V2I32 = fptoui - ; AVX2: cost of 6 {{.*}} %V2I32 = fptoui - ; AVX512F: cost of 6 {{.*}} %V2I32 = fptoui - ; AVX512DQ: cost of 1 {{.*}} %V2I32 = fptoui %V2I32 = fptoui <2 x double> undef to <2 x i32> - ; SSE2: cost of 13 {{.*}} %V4I32 = fptoui - ; SSE42: cost of 13 {{.*}} %V4I32 = fptoui - ; AVX1: cost of 16 {{.*}} %V4I32 = fptoui - ; AVX2: cost of 16 {{.*}} %V4I32 = fptoui - ; AVX512: cost of 16 {{.*}} %V4I32 = fptoui %V4I32 = fptoui <4 x double> undef to <4 x i32> - ; SSE2: cost of 27 {{.*}} %V8I32 = fptoui - ; SSE42: cost of 27 {{.*}} %V8I32 = fptoui - ; AVX1: cost of 33 {{.*}} %V8I32 = fptoui - ; AVX2: cost of 33 {{.*}} %V8I32 = fptoui - ; AVX512: cost of 1 {{.*}} %V8I32 = fptoui %V8I32 = fptoui <8 x double> undef to <8 x i32> - ret i32 undef } -; CHECK-LABEL: 'fptoui_double_i16' define i32 @fptoui_double_i16(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I16 = fptoui - ; SSE42: cost of 1 {{.*}} %I16 = fptoui - ; AVX1: cost of 1 {{.*}} %I16 = fptoui - ; AVX2: cost of 1 {{.*}} %I16 = fptoui - ; AVX512: cost of 1 {{.*}} %I16 = fptoui +; SSE-LABEL: 'fptoui_double_i16' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui double undef to i16 +; SSE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I16 = fptoui <2 x double> undef to <2 x i16> +; SSE-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V4I16 = fptoui <4 x double> undef to <4 x i16> +; SSE-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V8I16 = fptoui <8 x double> undef to <8 x i16> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptoui_double_i16' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui double undef to i16 +; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I16 = fptoui <2 x double> undef to <2 x i16> +; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I16 = fptoui <4 x double> undef to <4 x i16> +; AVX-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V8I16 = fptoui <8 x double> undef to <8 x i16> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'fptoui_double_i16' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui double undef to i16 +; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I16 = fptoui <2 x double> undef to <2 x i16> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptoui <4 x double> undef to <4 x i16> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I16 = fptoui <8 x double> undef to <8 x i16> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'fptoui_double_i16' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui double undef to i16 +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptoui <2 x double> undef to <2 x i16> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptoui <4 x double> undef to <4 x i16> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I16 = fptoui <8 x double> undef to <8 x i16> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I16 = fptoui double undef to i16 - ; SSE2: cost of 6 {{.*}} %V2I16 = fptoui - ; SSE42: cost of 6 {{.*}} %V2I16 = fptoui - ; AVX1: cost of 6 {{.*}} %V2I16 = fptoui - ; AVX2: cost of 6 {{.*}} %V2I16 = fptoui - ; AVX512F: cost of 6 {{.*}} %V2I16 = fptoui - ; AVX512DQ: cost of 1 {{.*}} %V2I16 = fptoui %V2I16 = fptoui <2 x double> undef to <2 x i16> - ; SSE2: cost of 13 {{.*}} %V4I16 = fptoui - ; SSE42: cost of 13 {{.*}} %V4I16 = fptoui - ; AVX1: cost of 12 {{.*}} %V4I16 = fptoui - ; AVX2: cost of 12 {{.*}} %V4I16 = fptoui - ; AVX512: cost of 1 {{.*}} %V4I16 = fptoui %V4I16 = fptoui <4 x double> undef to <4 x i16> - ; SSE2: cost of 27 {{.*}} %V8I16 = fptoui - ; SSE42: cost of 27 {{.*}} %V8I16 = fptoui - ; AVX1: cost of 25 {{.*}} %V8I16 = fptoui - ; AVX2: cost of 25 {{.*}} %V8I16 = fptoui - ; AVX512: cost of 2 {{.*}} %V8I16 = fptoui %V8I16 = fptoui <8 x double> undef to <8 x i16> - ret i32 undef } -; CHECK-LABEL: 'fptoui_double_i8' define i32 @fptoui_double_i8(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I8 = fptoui - ; SSE42: cost of 1 {{.*}} %I8 = fptoui - ; AVX1: cost of 1 {{.*}} %I8 = fptoui - ; AVX2: cost of 1 {{.*}} %I8 = fptoui - ; AVX512: cost of 1 {{.*}} %I8 = fptoui +; SSE-LABEL: 'fptoui_double_i8' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui double undef to i8 +; SSE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I8 = fptoui <2 x double> undef to <2 x i8> +; SSE-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V4I8 = fptoui <4 x double> undef to <4 x i8> +; SSE-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V8I8 = fptoui <8 x double> undef to <8 x i8> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptoui_double_i8' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui double undef to i8 +; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I8 = fptoui <2 x double> undef to <2 x i8> +; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I8 = fptoui <4 x double> undef to <4 x i8> +; AVX-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V8I8 = fptoui <8 x double> undef to <8 x i8> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'fptoui_double_i8' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui double undef to i8 +; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I8 = fptoui <2 x double> undef to <2 x i8> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I8 = fptoui <4 x double> undef to <4 x i8> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I8 = fptoui <8 x double> undef to <8 x i8> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'fptoui_double_i8' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui double undef to i8 +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I8 = fptoui <2 x double> undef to <2 x i8> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I8 = fptoui <4 x double> undef to <4 x i8> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I8 = fptoui <8 x double> undef to <8 x i8> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I8 = fptoui double undef to i8 - ; SSE2: cost of 6 {{.*}} %V2I8 = fptoui - ; SSE42: cost of 6 {{.*}} %V2I8 = fptoui - ; AVX1: cost of 6 {{.*}} %V2I8 = fptoui - ; AVX2: cost of 6 {{.*}} %V2I8 = fptoui - ; AVX512F: cost of 6 {{.*}} %V2I8 = fptoui - ; AVX512DQ: cost of 1 {{.*}} %V2I8 = fptoui %V2I8 = fptoui <2 x double> undef to <2 x i8> - ; SSE2: cost of 13 {{.*}} %V4I8 = fptoui - ; SSE42: cost of 13 {{.*}} %V4I8 = fptoui - ; AVX1: cost of 12 {{.*}} %V4I8 = fptoui - ; AVX2: cost of 12 {{.*}} %V4I8 = fptoui - ; AVX512: cost of 1 {{.*}} %V4I8 = fptoui %V4I8 = fptoui <4 x double> undef to <4 x i8> - ; SSE2: cost of 27 {{.*}} %V8I8 = fptoui - ; SSE42: cost of 27 {{.*}} %V8I8 = fptoui - ; AVX1: cost of 25 {{.*}} %V8I8 = fptoui - ; AVX2: cost of 25 {{.*}} %V8I8 = fptoui - ; AVX512: cost of 2 {{.*}} %V8I8 = fptoui %V8I8 = fptoui <8 x double> undef to <8 x i8> - ret i32 undef } -; CHECK-LABEL: 'fptoui_float_i64' define i32 @fptoui_float_i64(i32 %arg) { - ; SSE2: cost of 4 {{.*}} %I64 = fptoui - ; SSE42: cost of 4 {{.*}} %I64 = fptoui - ; AVX1: cost of 4 {{.*}} %I64 = fptoui - ; AVX2: cost of 4 {{.*}} %I64 = fptoui - ; AVX512: cost of 1 {{.*}} %I64 = fptoui +; SSE-LABEL: 'fptoui_float_i64' +; SSE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptoui float undef to i64 +; SSE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V2I64 = fptoui <2 x float> undef to <2 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V4I64 = fptoui <4 x float> undef to <4 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %V8I64 = fptoui <8 x float> undef to <8 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %V16I64 = fptoui <16 x float> undef to <16 x i64> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptoui_float_i64' +; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptoui float undef to i64 +; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V2I64 = fptoui <2 x float> undef to <2 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V4I64 = fptoui <4 x float> undef to <4 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 49 for instruction: %V8I64 = fptoui <8 x float> undef to <8 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 99 for instruction: %V16I64 = fptoui <16 x float> undef to <16 x i64> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'fptoui_float_i64' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptoui float undef to i64 +; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptoui <2 x float> undef to <2 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I64 = fptoui <4 x float> undef to <4 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8I64 = fptoui <8 x float> undef to <8 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 49 for instruction: %V16I64 = fptoui <16 x float> undef to <16 x i64> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'fptoui_float_i64' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptoui float undef to i64 +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = fptoui <2 x float> undef to <2 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = fptoui <4 x float> undef to <4 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = fptoui <8 x float> undef to <8 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I64 = fptoui <16 x float> undef to <16 x i64> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I64 = fptoui float undef to i64 - ; SSE2: cost of 12 {{.*}} %V2I64 = fptoui - ; SSE42: cost of 12 {{.*}} %V2I64 = fptoui - ; AVX1: cost of 12 {{.*}} %V2I64 = fptoui - ; AVX2: cost of 12 {{.*}} %V2I64 = fptoui - ; AVX512F: cost of 6 {{.*}} %V2I64 = fptoui - ; AVX512DQ: cost of 1 {{.*}} %V2I64 = fptoui %V2I64 = fptoui <2 x float> undef to <2 x i64> - ; SSE2: cost of 25 {{.*}} %V4I64 = fptoui - ; SSE42: cost of 25 {{.*}} %V4I64 = fptoui - ; AVX1: cost of 24 {{.*}} %V4I64 = fptoui - ; AVX2: cost of 24 {{.*}} %V4I64 = fptoui - ; AVX512F: cost of 12 {{.*}} %V4I64 = fptoui - ; AVX512DQ: cost of 1 {{.*}} %V4I64 = fptoui %V4I64 = fptoui <4 x float> undef to <4 x i64> - ; SSE2: cost of 51 {{.*}} %V8I64 = fptoui - ; SSE42: cost of 51 {{.*}} %V8I64 = fptoui - ; AVX1: cost of 49 {{.*}} %V8I64 = fptoui - ; AVX2: cost of 49 {{.*}} %V8I64 = fptoui - ; AVX512F: cost of 24 {{.*}} %V8I64 = fptoui - ; AVX512DQ: cost of 1 {{.*}} %V8I64 = fptoui %V8I64 = fptoui <8 x float> undef to <8 x i64> - ; SSE2: cost of 103 {{.*}} %V16I64 = fptoui - ; SSE42: cost of 103 {{.*}} %V16I64 = fptoui - ; AVX1: cost of 99 {{.*}} %V16I64 = fptoui - ; AVX2: cost of 99 {{.*}} %V16I64 = fptoui - ; AVX512F: cost of 49 {{.*}} %V16I64 = fptoui - ; AVX512DQ: cost of 3 {{.*}} %V16I64 = fptoui %V16I64 = fptoui <16 x float> undef to <16 x i64> - ret i32 undef } -; CHECK-LABEL: 'fptoui_float_i32' define i32 @fptoui_float_i32(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I32 = fptoui - ; SSE42: cost of 1 {{.*}} %I32 = fptoui - ; AVX1: cost of 1 {{.*}} %I32 = fptoui - ; AVX2: cost of 1 {{.*}} %I32 = fptoui - ; AVX512: cost of 1 {{.*}} %I32 = fptoui +; SSE-LABEL: 'fptoui_float_i32' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui float undef to i32 +; SSE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I32 = fptoui <4 x float> undef to <4 x i32> +; SSE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V8I32 = fptoui <8 x float> undef to <8 x i32> +; SSE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %V16I32 = fptoui <16 x float> undef to <16 x i32> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptoui_float_i32' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui float undef to i32 +; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I32 = fptoui <4 x float> undef to <4 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V8I32 = fptoui <8 x float> undef to <8 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %V16I32 = fptoui <16 x float> undef to <16 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'fptoui_float_i32' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui float undef to i32 +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptoui <4 x float> undef to <4 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptoui <8 x float> undef to <8 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = fptoui <16 x float> undef to <16 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I32 = fptoui float undef to i32 - ; SSE2: cost of 12 {{.*}} %V4I32 = fptoui - ; SSE42: cost of 12 {{.*}} %V4I32 = fptoui - ; AVX1: cost of 12 {{.*}} %V4I32 = fptoui - ; AVX2: cost of 12 {{.*}} %V4I32 = fptoui - ; AVX512: cost of 1 {{.*}} %V4I32 = fptoui %V4I32 = fptoui <4 x float> undef to <4 x i32> - ; SSE2: cost of 25 {{.*}} %V8I32 = fptoui - ; SSE42: cost of 25 {{.*}} %V8I32 = fptoui - ; AVX1: cost of 32 {{.*}} %V8I32 = fptoui - ; AVX2: cost of 32 {{.*}} %V8I32 = fptoui - ; AVX512: cost of 1 {{.*}} %V8I32 = fptoui %V8I32 = fptoui <8 x float> undef to <8 x i32> - ; SSE2: cost of 51 {{.*}} %V16I32 = fptoui - ; SSE42: cost of 51 {{.*}} %V16I32 = fptoui - ; AVX1: cost of 65 {{.*}} %V16I32 = fptoui - ; AVX2: cost of 65 {{.*}} %V16I32 = fptoui - ; AVX512: cost of 1 {{.*}} %V16I32 = fptoui %V16I32 = fptoui <16 x float> undef to <16 x i32> - ret i32 undef } -; CHECK-LABEL: 'fptoui_float_i16' define i32 @fptoui_float_i16(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I16 = fptoui - ; SSE42: cost of 1 {{.*}} %I16 = fptoui - ; AVX1: cost of 1 {{.*}} %I16 = fptoui - ; AVX2: cost of 1 {{.*}} %I16 = fptoui - ; AVX512: cost of 1 {{.*}} %I16 = fptoui +; SSE-LABEL: 'fptoui_float_i16' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui float undef to i16 +; SSE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I16 = fptoui <4 x float> undef to <4 x i16> +; SSE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V8I16 = fptoui <8 x float> undef to <8 x i16> +; SSE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %V16I16 = fptoui <16 x float> undef to <16 x i16> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptoui_float_i16' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui float undef to i16 +; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I16 = fptoui <4 x float> undef to <4 x i16> +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = fptoui <8 x float> undef to <8 x i16> +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I16 = fptoui <16 x float> undef to <16 x i16> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'fptoui_float_i16' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui float undef to i16 +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptoui <4 x float> undef to <4 x i16> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = fptoui <8 x float> undef to <8 x i16> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16I16 = fptoui <16 x float> undef to <16 x i16> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I16 = fptoui float undef to i16 - ; SSE2: cost of 12 {{.*}} %V4I16 = fptoui - ; SSE42: cost of 12 {{.*}} %V4I16 = fptoui - ; AVX1: cost of 12 {{.*}} %V4I16 = fptoui - ; AVX2: cost of 12 {{.*}} %V4I16 = fptoui - ; AVX512: cost of 1 {{.*}} %V4I16 = fptoui %V4I16 = fptoui <4 x float> undef to <4 x i16> - ; SSE2: cost of 25 {{.*}} %V8I16 = fptoui - ; SSE42: cost of 25 {{.*}} %V8I16 = fptoui - ; AVX1: cost of 1 {{.*}} %V8I16 = fptoui - ; AVX2: cost of 1 {{.*}} %V8I16 = fptoui - ; AVX512: cost of 1 {{.*}} %V8I16 = fptoui %V8I16 = fptoui <8 x float> undef to <8 x i16> - ; SSE2: cost of 51 {{.*}} %V16I16 = fptoui - ; SSE42: cost of 51 {{.*}} %V16I16 = fptoui - ; AVX1: cost of 3 {{.*}} %V16I16 = fptoui - ; AVX2: cost of 3 {{.*}} %V16I16 = fptoui - ; AVX512: cost of 2 {{.*}} %V16I16 = fptoui %V16I16 = fptoui <16 x float> undef to <16 x i16> - ret i32 undef } -; CHECK-LABEL: 'fptoui_float_i8' define i32 @fptoui_float_i8(i32 %arg) { - ; SSE2: cost of 1 {{.*}} %I8 = fptoui - ; SSE42: cost of 1 {{.*}} %I8 = fptoui - ; AVX1: cost of 1 {{.*}} %I8 = fptoui - ; AVX2: cost of 1 {{.*}} %I8 = fptoui - ; AVX512: cost of 1 {{.*}} %I8 = fptoui +; SSE-LABEL: 'fptoui_float_i8' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui float undef to i8 +; SSE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I8 = fptoui <4 x float> undef to <4 x i8> +; SSE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V8I8 = fptoui <8 x float> undef to <8 x i8> +; SSE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %V16I8 = fptoui <16 x float> undef to <16 x i8> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'fptoui_float_i8' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui float undef to i8 +; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I8 = fptoui <4 x float> undef to <4 x i8> +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I8 = fptoui <8 x float> undef to <8 x i8> +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I8 = fptoui <16 x float> undef to <16 x i8> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'fptoui_float_i8' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui float undef to i8 +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I8 = fptoui <4 x float> undef to <4 x i8> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I8 = fptoui <8 x float> undef to <8 x i8> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16I8 = fptoui <16 x float> undef to <16 x i8> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %I8 = fptoui float undef to i8 - ; SSE2: cost of 12 {{.*}} %V4I8 = fptoui - ; SSE42: cost of 12 {{.*}} %V4I8 = fptoui - ; AVX1: cost of 12 {{.*}} %V4I8 = fptoui - ; AVX2: cost of 12 {{.*}} %V4I8 = fptoui - ; AVX512: cost of 1 {{.*}} %V4I8 = fptoui %V4I8 = fptoui <4 x float> undef to <4 x i8> - ; SSE2: cost of 25 {{.*}} %V8I8 = fptoui - ; SSE42: cost of 25 {{.*}} %V8I8 = fptoui - ; AVX1: cost of 1 {{.*}} %V8I8 = fptoui - ; AVX2: cost of 1 {{.*}} %V8I8 = fptoui - ; AVX512: cost of 1 {{.*}} %V8I8 = fptoui %V8I8 = fptoui <8 x float> undef to <8 x i8> - ; SSE2: cost of 51 {{.*}} %V16I8 = fptoui - ; SSE42: cost of 51 {{.*}} %V16I8 = fptoui - ; AVX1: cost of 3 {{.*}} %V16I8 = fptoui - ; AVX2: cost of 3 {{.*}} %V16I8 = fptoui - ; AVX512: cost of 2 {{.*}} %V16I8 = fptoui %V16I8 = fptoui <16 x float> undef to <16 x i8> - ret i32 undef } diff --git a/llvm/test/Analysis/CostModel/X86/sitofp.ll b/llvm/test/Analysis/CostModel/X86/sitofp.ll index a30cb5f..08fbb2b 100644 --- a/llvm/test/Analysis/CostModel/X86/sitofp.ll +++ b/llvm/test/Analysis/CostModel/X86/sitofp.ll @@ -1,250 +1,257 @@ -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+sse2 -cost-model -analyze < %s | FileCheck --check-prefix=SSE --check-prefix=SSE2 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx -cost-model -analyze < %s | FileCheck --check-prefix=AVX --check-prefix=AVX1 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx2 -cost-model -analyze < %s | FileCheck --check-prefix=AVX --check-prefix=AVX2 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx512f -cost-model -analyze < %s | FileCheck --check-prefix=AVX512 --check-prefix=AVX512F %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx512dq -cost-model -analyze < %s | FileCheck --check-prefix=AVX512 --check-prefix=AVX512DQ %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,SSE,SSE2 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX2 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx512f | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512DQ -; CHECK-LABEL: 'sitofp_i8_double' define i32 @sitofp_i8_double() { - ; SSE2: cost of 1 {{.*}} sitofp i8 - ; AVX1: cost of 1 {{.*}} sitofp i8 - ; AVX2: cost of 1 {{.*}} sitofp i8 - ; AVX512: cost of 1 {{.*}} sitofp i8 +; SSE-LABEL: 'sitofp_i8_double' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i8_f64 = sitofp i8 undef to double +; SSE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cvt_v2i8_v2f64 = sitofp <2 x i8> undef to <2 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %cvt_v4i8_v4f64 = sitofp <4 x i8> undef to <4 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %cvt_v8i8_v8f64 = sitofp <8 x i8> undef to <8 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'sitofp_i8_double' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i8_f64 = sitofp i8 undef to double +; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i8_v2f64 = sitofp <2 x i8> undef to <2 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cvt_v4i8_v4f64 = sitofp <4 x i8> undef to <4 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cvt_v8i8_v8f64 = sitofp <8 x i8> undef to <8 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'sitofp_i8_double' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i8_f64 = sitofp i8 undef to double +; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i8_v2f64 = sitofp <2 x i8> undef to <2 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cvt_v4i8_v4f64 = sitofp <4 x i8> undef to <4 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i8_v8f64 = sitofp <8 x i8> undef to <8 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i8_f64 = sitofp i8 undef to double - - ; SSE2: cost of 20 {{.*}} sitofp <2 x i8> - ; AVX1: cost of 4 {{.*}} sitofp <2 x i8> - ; AVX2: cost of 4 {{.*}} sitofp <2 x i8> - ; AVX512: cost of 4 {{.*}} sitofp <2 x i8> %cvt_v2i8_v2f64 = sitofp <2 x i8> undef to <2 x double> - - ; SSE2: cost of 40 {{.*}} sitofp <4 x i8> - ; AVX1: cost of 3 {{.*}} sitofp <4 x i8> - ; AVX2: cost of 3 {{.*}} sitofp <4 x i8> - ; AVX512: cost of 3 {{.*}} sitofp <4 x i8> %cvt_v4i8_v4f64 = sitofp <4 x i8> undef to <4 x double> - - ; SSE2: cost of 80 {{.*}} sitofp <8 x i8> - ; AVX1: cost of 7 {{.*}} sitofp <8 x i8> - ; AVX2: cost of 7 {{.*}} sitofp <8 x i8> - ; AVX512: cost of 2 {{.*}} sitofp <8 x i8> %cvt_v8i8_v8f64 = sitofp <8 x i8> undef to <8 x double> - ret i32 undef } -; CHECK-LABEL: 'sitofp_i16_double' define i32 @sitofp_i16_double() { - ; SSE2: cost of 1 {{.*}} sitofp i16 - ; AVX1: cost of 1 {{.*}} sitofp i16 - ; AVX2: cost of 1 {{.*}} sitofp i16 - ; AVX512: cost of 1 {{.*}} sitofp i16 +; SSE-LABEL: 'sitofp_i16_double' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i16_f64 = sitofp i16 undef to double +; SSE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cvt_v2i16_v2f64 = sitofp <2 x i16> undef to <2 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %cvt_v4i16_v4f64 = sitofp <4 x i16> undef to <4 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %cvt_v8i16_v8f64 = sitofp <8 x i16> undef to <8 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'sitofp_i16_double' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i16_f64 = sitofp i16 undef to double +; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i16_v2f64 = sitofp <2 x i16> undef to <2 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cvt_v4i16_v4f64 = sitofp <4 x i16> undef to <4 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cvt_v8i16_v8f64 = sitofp <8 x i16> undef to <8 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'sitofp_i16_double' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i16_f64 = sitofp i16 undef to double +; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i16_v2f64 = sitofp <2 x i16> undef to <2 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cvt_v4i16_v4f64 = sitofp <4 x i16> undef to <4 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i16_v8f64 = sitofp <8 x i16> undef to <8 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i16_f64 = sitofp i16 undef to double - - ; SSE2: cost of 20 {{.*}} sitofp <2 x i16> - ; AVX1: cost of 4 {{.*}} sitofp <2 x i16> - ; AVX2: cost of 4 {{.*}} sitofp <2 x i16> - ; AVX512: cost of 4 {{.*}} sitofp <2 x i16> %cvt_v2i16_v2f64 = sitofp <2 x i16> undef to <2 x double> - - ; SSE2: cost of 40 {{.*}} sitofp <4 x i16> - ; AVX1: cost of 3 {{.*}} sitofp <4 x i16> - ; AVX2: cost of 3 {{.*}} sitofp <4 x i16> - ; AVX512: cost of 3 {{.*}} sitofp <4 x i16> %cvt_v4i16_v4f64 = sitofp <4 x i16> undef to <4 x double> - - ; SSE2: cost of 80 {{.*}} sitofp <8 x i16> - ; AVX1: cost of 7 {{.*}} sitofp <8 x i16> - ; AVX2: cost of 7 {{.*}} sitofp <8 x i16> - ; AVX512: cost of 2 {{.*}} sitofp <8 x i16> %cvt_v8i16_v8f64 = sitofp <8 x i16> undef to <8 x double> - ret i32 undef } -; CHECK-LABEL: 'sitofp_i32_double' define i32 @sitofp_i32_double() { - ; SSE2: cost of 1 {{.*}} sitofp i32 - ; AVX1: cost of 1 {{.*}} sitofp i32 - ; AVX2: cost of 1 {{.*}} sitofp i32 - ; AVX512: cost of 1 {{.*}} sitofp i32 +; SSE-LABEL: 'sitofp_i32_double' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f64 = sitofp i32 undef to double +; SSE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cvt_v2i32_v2f64 = sitofp <2 x i32> undef to <2 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %cvt_v4i32_v4f64 = sitofp <4 x i32> undef to <4 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %cvt_v8i32_v8f64 = sitofp <8 x i32> undef to <8 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'sitofp_i32_double' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f64 = sitofp i32 undef to double +; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i32_v2f64 = sitofp <2 x i32> undef to <2 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i32_v4f64 = sitofp <4 x i32> undef to <4 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cvt_v8i32_v8f64 = sitofp <8 x i32> undef to <8 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'sitofp_i32_double' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f64 = sitofp i32 undef to double +; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i32_v2f64 = sitofp <2 x i32> undef to <2 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i32_v4f64 = sitofp <4 x i32> undef to <4 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i32_v8f64 = sitofp <8 x i32> undef to <8 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i32_f64 = sitofp i32 undef to double - - ; SSE2: cost of 20 {{.*}} sitofp <2 x i32> - ; AVX1: cost of 4 {{.*}} sitofp <2 x i32> - ; AVX2: cost of 4 {{.*}} sitofp <2 x i32> - ; AVX512: cost of 4 {{.*}} sitofp <2 x i32> %cvt_v2i32_v2f64 = sitofp <2 x i32> undef to <2 x double> - - ; SSE2: cost of 40 {{.*}} sitofp <4 x i32> - ; AVX1: cost of 1 {{.*}} sitofp <4 x i32> - ; AVX2: cost of 1 {{.*}} sitofp <4 x i32> - ; AVX512: cost of 1 {{.*}} sitofp <4 x i32> %cvt_v4i32_v4f64 = sitofp <4 x i32> undef to <4 x double> - - ; SSE2: cost of 80 {{.*}} sitofp <8 x i32> - ; AVX1: cost of 3 {{.*}} sitofp <8 x i32> - ; AVX2: cost of 3 {{.*}} sitofp <8 x i32> - ; AVX512: cost of 1 {{.*}} sitofp <8 x i32> %cvt_v8i32_v8f64 = sitofp <8 x i32> undef to <8 x double> - ret i32 undef } -; CHECK-LABEL: 'sitofp_i64_double' define i32 @sitofp_i64_double() { - ; SSE2: cost of 1 {{.*}} sitofp i64 - ; AVX1: cost of 1 {{.*}} sitofp i64 - ; AVX2: cost of 1 {{.*}} sitofp i64 - ; AVX512: cost of 1 {{.*}} sitofp i64 +; SSE-LABEL: 'sitofp_i64_double' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f64 = sitofp i64 undef to double +; SSE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cvt_v2i64_v2f64 = sitofp <2 x i64> undef to <2 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %cvt_v4i64_v4f64 = sitofp <4 x i64> undef to <4 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %cvt_v8i64_v8f64 = sitofp <8 x i64> undef to <8 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'sitofp_i64_double' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f64 = sitofp i64 undef to double +; AVX-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cvt_v2i64_v2f64 = sitofp <2 x i64> undef to <2 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cvt_v4i64_v4f64 = sitofp <4 x i64> undef to <4 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %cvt_v8i64_v8f64 = sitofp <8 x i64> undef to <8 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'sitofp_i64_double' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f64 = sitofp i64 undef to double +; AVX512F-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cvt_v2i64_v2f64 = sitofp <2 x i64> undef to <2 x double> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cvt_v4i64_v4f64 = sitofp <4 x i64> undef to <4 x double> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %cvt_v8i64_v8f64 = sitofp <8 x i64> undef to <8 x double> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'sitofp_i64_double' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f64 = sitofp i64 undef to double +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i64_v2f64 = sitofp <2 x i64> undef to <2 x double> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i64_v4f64 = sitofp <4 x i64> undef to <4 x double> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i64_v8f64 = sitofp <8 x i64> undef to <8 x double> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i64_f64 = sitofp i64 undef to double - - ; SSE2: cost of 20 {{.*}} sitofp <2 x i64> - ; AVX1: cost of 20 {{.*}} sitofp <2 x i64> - ; AVX2: cost of 20 {{.*}} sitofp <2 x i64> - ; AVX512F: cost of 20 {{.*}} sitofp <2 x i64> - ; AVX512DQ: cost of 1 {{.*}} sitofp <2 x i64> %cvt_v2i64_v2f64 = sitofp <2 x i64> undef to <2 x double> - - ; SSE2: cost of 40 {{.*}} sitofp <4 x i64> - ; AVX1: cost of 13 {{.*}} sitofp <4 x i64> - ; AVX2: cost of 13 {{.*}} sitofp <4 x i64> - ; AVX512F: cost of 13 {{.*}} sitofp <4 x i64> - ; AVX512DQ: cost of 1 {{.*}} sitofp <4 x i64> %cvt_v4i64_v4f64 = sitofp <4 x i64> undef to <4 x double> - - ; SSE2: cost of 80 {{.*}} sitofp <8 x i64> - ; AVX1: cost of 27 {{.*}} sitofp <8 x i64> - ; AVX2: cost of 27 {{.*}} sitofp <8 x i64> - ; AVX512F: cost of 22 {{.*}} sitofp <8 x i64> - ; AVX512DQ: cost of 1 {{.*}} sitofp <8 x i64> %cvt_v8i64_v8f64 = sitofp <8 x i64> undef to <8 x double> - ret i32 undef } -; CHECK-LABEL: 'sitofp_i8_float' define i32 @sitofp_i8_float() { - ; SSE2: cost of 1 {{.*}} sitofp i8 - ; AVX1: cost of 1 {{.*}} sitofp i8 - ; AVX2: cost of 1 {{.*}} sitofp i8 - ; AVX512: cost of 1 {{.*}} sitofp i8 +; SSE-LABEL: 'sitofp_i8_float' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i8_f32 = sitofp i8 undef to float +; SSE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cvt_v4i8_v4f32 = sitofp <4 x i8> undef to <4 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %cvt_v8i8_v8f32 = sitofp <8 x i8> undef to <8 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %cvt_v16i8_v16f32 = sitofp <16 x i8> undef to <16 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'sitofp_i8_float' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i8_f32 = sitofp i8 undef to float +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cvt_v4i8_v4f32 = sitofp <4 x i8> undef to <4 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %cvt_v8i8_v8f32 = sitofp <8 x i8> undef to <8 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %cvt_v16i8_v16f32 = sitofp <16 x i8> undef to <16 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'sitofp_i8_float' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i8_f32 = sitofp i8 undef to float +; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cvt_v4i8_v4f32 = sitofp <4 x i8> undef to <4 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %cvt_v8i8_v8f32 = sitofp <8 x i8> undef to <8 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v16i8_v16f32 = sitofp <16 x i8> undef to <16 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i8_f32 = sitofp i8 undef to float - - ; SSE2: cost of 5 {{.*}} sitofp <4 x i8> - ; AVX1: cost of 3 {{.*}} sitofp <4 x i8> - ; AVX2: cost of 3 {{.*}} sitofp <4 x i8> - ; AVX512: cost of 3 {{.*}} sitofp <4 x i8> %cvt_v4i8_v4f32 = sitofp <4 x i8> undef to <4 x float> - - ; SSE2: cost of 15 {{.*}} sitofp <8 x i8> - ; AVX1: cost of 8 {{.*}} sitofp <8 x i8> - ; AVX2: cost of 8 {{.*}} sitofp <8 x i8> - ; AVX512: cost of 8 {{.*}} sitofp <8 x i8> %cvt_v8i8_v8f32 = sitofp <8 x i8> undef to <8 x float> - - ; SSE2: cost of 8 {{.*}} sitofp <16 x i8> - ; AVX1: cost of 17 {{.*}} sitofp <16 x i8> - ; AVX16: cost of 17 {{.*}} sitofp <16 x i8> - ; AVX512: cost of 2 {{.*}} sitofp <16 x i8> %cvt_v16i8_v16f32 = sitofp <16 x i8> undef to <16 x float> - ret i32 undef } -; CHECK-LABEL: 'sitofp_i16_float' define i32 @sitofp_i16_float() { - ; SSE2: cost of 1 {{.*}} sitofp i16 - ; AVX1: cost of 1 {{.*}} sitofp i16 - ; AVX2: cost of 1 {{.*}} sitofp i16 - ; AVX512: cost of 1 {{.*}} sitofp i16 +; SSE-LABEL: 'sitofp_i16_float' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i16_f32 = sitofp i16 undef to float +; SSE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cvt_v4i16_v4f32 = sitofp <4 x i16> undef to <4 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %cvt_v8i16_v8f32 = sitofp <8 x i16> undef to <8 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %cvt_v16i16_v16f32 = sitofp <16 x i16> undef to <16 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'sitofp_i16_float' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i16_f32 = sitofp i16 undef to float +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cvt_v4i16_v4f32 = sitofp <4 x i16> undef to <4 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cvt_v8i16_v8f32 = sitofp <8 x i16> undef to <8 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %cvt_v16i16_v16f32 = sitofp <16 x i16> undef to <16 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'sitofp_i16_float' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i16_f32 = sitofp i16 undef to float +; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cvt_v4i16_v4f32 = sitofp <4 x i16> undef to <4 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cvt_v8i16_v8f32 = sitofp <8 x i16> undef to <8 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v16i16_v16f32 = sitofp <16 x i16> undef to <16 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i16_f32 = sitofp i16 undef to float - - ; SSE2: cost of 5 {{.*}} sitofp <4 x i16> - ; AVX1: cost of 3 {{.*}} sitofp <4 x i16> - ; AVX2: cost of 3 {{.*}} sitofp <4 x i16> - ; AVX512: cost of 3 {{.*}} sitofp <4 x i16> %cvt_v4i16_v4f32 = sitofp <4 x i16> undef to <4 x float> - - ; SSE2: cost of 15 {{.*}} sitofp <8 x i16> - ; AVX1: cost of 5 {{.*}} sitofp <8 x i16> - ; AVX2: cost of 5 {{.*}} sitofp <8 x i16> - ; AVX512: cost of 5 {{.*}} sitofp <8 x i16> %cvt_v8i16_v8f32 = sitofp <8 x i16> undef to <8 x float> - - ; SSE2: cost of 30 {{.*}} sitofp <16 x i16> - ; AVX1: cost of 11 {{.*}} sitofp <16 x i16> - ; AVX16: cost of 11 {{.*}} sitofp <16 x i16> - ; AVX512: cost of 2 {{.*}} sitofp <16 x i16> %cvt_v16i16_v16f32 = sitofp <16 x i16> undef to <16 x float> - ret i32 undef } -; CHECK-LABEL: 'sitofp_i32_float' define i32 @sitofp_i32_float() { - ; SSE2: cost of 1 {{.*}} sitofp i32 - ; AVX1: cost of 1 {{.*}} sitofp i32 - ; AVX2: cost of 1 {{.*}} sitofp i32 - ; AVX512: cost of 1 {{.*}} sitofp i32 +; SSE-LABEL: 'sitofp_i32_float' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f32 = sitofp i32 undef to float +; SSE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cvt_v4i32_v4f32 = sitofp <4 x i32> undef to <4 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cvt_v8i32_v8f32 = sitofp <8 x i32> undef to <8 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cvt_v16i32_v16f32 = sitofp <16 x i32> undef to <16 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'sitofp_i32_float' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f32 = sitofp i32 undef to float +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i32_v4f32 = sitofp <4 x i32> undef to <4 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i32_v8f32 = sitofp <8 x i32> undef to <8 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cvt_v16i32_v16f32 = sitofp <16 x i32> undef to <16 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'sitofp_i32_float' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f32 = sitofp i32 undef to float +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i32_v4f32 = sitofp <4 x i32> undef to <4 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i32_v8f32 = sitofp <8 x i32> undef to <8 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v16i32_v16f32 = sitofp <16 x i32> undef to <16 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i32_f32 = sitofp i32 undef to float - - ; SSE2: cost of 5 {{.*}} sitofp <4 x i32> - ; AVX1: cost of 1 {{.*}} sitofp <4 x i32> - ; AVX2: cost of 1 {{.*}} sitofp <4 x i32> - ; AVX512: cost of 1 {{.*}} sitofp <4 x i32> %cvt_v4i32_v4f32 = sitofp <4 x i32> undef to <4 x float> - - ; SSE2: cost of 10 {{.*}} sitofp <8 x i32> - ; AVX1: cost of 1 {{.*}} sitofp <8 x i32> - ; AVX2: cost of 1 {{.*}} sitofp <8 x i32> - ; AVX512: cost of 1 {{.*}} sitofp <8 x i32> %cvt_v8i32_v8f32 = sitofp <8 x i32> undef to <8 x float> - - ; SSE2: cost of 20 {{.*}} sitofp <16 x i32> - ; AVX1: cost of 3 {{.*}} sitofp <16 x i32> - ; AVX2: cost of 3 {{.*}} sitofp <16 x i32> - ; AVX512: cost of 1 {{.*}} sitofp <16 x i32> %cvt_v16i32_v16f32 = sitofp <16 x i32> undef to <16 x float> - ret i32 undef } -; CHECK-LABEL: 'sitofp_i64_float' define i32 @sitofp_i64_float() { - ; SSE2: cost of 1 {{.*}} sitofp i64 - ; AVX1: cost of 1 {{.*}} sitofp i64 - ; AVX2: cost of 1 {{.*}} sitofp i64 - ; AVX512: cost of 1 {{.*}} sitofp i64 +; SSE-LABEL: 'sitofp_i64_float' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f32 = sitofp i64 undef to float +; SSE-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %cvt_v2i64_v2f32 = sitofp <2 x i64> undef to <2 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %cvt_v4i64_v4f32 = sitofp <4 x i64> undef to <4 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %cvt_v8i64_v8f32 = sitofp <8 x i64> undef to <8 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 120 for instruction: %cvt_v16i64_v16f32 = sitofp <16 x i64> undef to <16 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'sitofp_i64_float' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f32 = sitofp i64 undef to float +; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i64_v2f32 = sitofp <2 x i64> undef to <2 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cvt_v4i64_v4f32 = sitofp <4 x i64> undef to <4 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %cvt_v8i64_v8f32 = sitofp <8 x i64> undef to <8 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %cvt_v16i64_v16f32 = sitofp <16 x i64> undef to <16 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'sitofp_i64_float' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f32 = sitofp i64 undef to float +; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i64_v2f32 = sitofp <2 x i64> undef to <2 x float> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cvt_v4i64_v4f32 = sitofp <4 x i64> undef to <4 x float> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %cvt_v8i64_v8f32 = sitofp <8 x i64> undef to <8 x float> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 45 for instruction: %cvt_v16i64_v16f32 = sitofp <16 x i64> undef to <16 x float> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'sitofp_i64_float' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f32 = sitofp i64 undef to float +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i64_v2f32 = sitofp <2 x i64> undef to <2 x float> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i64_v4f32 = sitofp <4 x i64> undef to <4 x float> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i64_v8f32 = sitofp <8 x i64> undef to <8 x float> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cvt_v16i64_v16f32 = sitofp <16 x i64> undef to <16 x float> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i64_f32 = sitofp i64 undef to float - - ; SSE2: cost of 15 {{.*}} sitofp <2 x i64> - ; AVX1: cost of 4 {{.*}} sitofp <2 x i64> - ; AVX2: cost of 4 {{.*}} sitofp <2 x i64> - ; AVX512F: cost of 4 {{.*}} sitofp <2 x i64> - ; AVX512DQ: cost of 1 {{.*}} sitofp <2 x i64> %cvt_v2i64_v2f32 = sitofp <2 x i64> undef to <2 x float> - - ; SSE2: cost of 30 {{.*}} sitofp <4 x i64> - ; AVX1: cost of 10 {{.*}} sitofp <4 x i64> - ; AVX2: cost of 10 {{.*}} sitofp <4 x i64> - ; AVX512F: cost of 10 {{.*}} sitofp <4 x i64> - ; AVX512DQ: cost of 1 {{.*}} sitofp <4 x i64> %cvt_v4i64_v4f32 = sitofp <4 x i64> undef to <4 x float> - - ; SSE2: cost of 60 {{.*}} sitofp <8 x i64> - ; AVX1: cost of 21 {{.*}} sitofp <8 x i64> - ; AVX2: cost of 21 {{.*}} sitofp <8 x i64> - ; AVX512F: cost of 22 {{.*}} sitofp <8 x i64> - ; AVX512DQ: cost of 1 {{.*}} sitofp <8 x i64> %cvt_v8i64_v8f32 = sitofp <8 x i64> undef to <8 x float> - - ; SSE2: cost of 120 {{.*}} sitofp <16 x i64> - ; AVX1: cost of 43 {{.*}} sitofp <16 x i64> - ; AVX2: cost of 43 {{.*}} sitofp <16 x i64> - ; AVX512F: cost of 45 {{.*}} sitofp <16 x i64> - ; AVX512DQ: cost of 3 {{.*}} sitofp <16 x i64> %cvt_v16i64_v16f32 = sitofp <16 x i64> undef to <16 x float> - ret i32 undef } diff --git a/llvm/test/Analysis/CostModel/X86/uitofp.ll b/llvm/test/Analysis/CostModel/X86/uitofp.ll index a0b48c0..91fc123 100644 --- a/llvm/test/Analysis/CostModel/X86/uitofp.ll +++ b/llvm/test/Analysis/CostModel/X86/uitofp.ll @@ -1,250 +1,264 @@ -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+sse2 -cost-model -analyze < %s | FileCheck --check-prefix=SSE --check-prefix=SSE2 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx -cost-model -analyze < %s | FileCheck --check-prefix=AVX --check-prefix=AVX1 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx2 -cost-model -analyze < %s | FileCheck --check-prefix=AVX --check-prefix=AVX2 %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx512f -cost-model -analyze < %s | FileCheck --check-prefix=AVX512 --check-prefix=AVX512F %s -; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx512dq -cost-model -analyze < %s | FileCheck --check-prefix=AVX512 --check-prefix=AVX512DQ %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,SSE,SSE2 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX2 +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx512f | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F +; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512DQ -; CHECK-LABEL: 'uitofp_i8_double' define i32 @uitofp_i8_double() { - ; SSE2: cost of 1 {{.*}} uitofp i8 - ; AVX1: cost of 1 {{.*}} uitofp i8 - ; AVX2: cost of 1 {{.*}} uitofp i8 - ; AVX512: cost of 1 {{.*}} uitofp i8 +; SSE-LABEL: 'uitofp_i8_double' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i8_f64 = uitofp i8 undef to double +; SSE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cvt_v2i8_v2f64 = uitofp <2 x i8> undef to <2 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %cvt_v4i8_v4f64 = uitofp <4 x i8> undef to <4 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %cvt_v8i8_v8f64 = uitofp <8 x i8> undef to <8 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'uitofp_i8_double' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i8_f64 = uitofp i8 undef to double +; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i8_v2f64 = uitofp <2 x i8> undef to <2 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i8_v4f64 = uitofp <4 x i8> undef to <4 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cvt_v8i8_v8f64 = uitofp <8 x i8> undef to <8 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'uitofp_i8_double' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i8_f64 = uitofp i8 undef to double +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v2i8_v2f64 = uitofp <2 x i8> undef to <2 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i8_v4f64 = uitofp <4 x i8> undef to <4 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i8_v8f64 = uitofp <8 x i8> undef to <8 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i8_f64 = uitofp i8 undef to double - - ; SSE2: cost of 20 {{.*}} uitofp <2 x i8> - ; AVX1: cost of 4 {{.*}} uitofp <2 x i8> - ; AVX2: cost of 4 {{.*}} uitofp <2 x i8> - ; AVX512: cost of 2 {{.*}} uitofp <2 x i8> %cvt_v2i8_v2f64 = uitofp <2 x i8> undef to <2 x double> - - ; SSE2: cost of 40 {{.*}} uitofp <4 x i8> - ; AVX1: cost of 2 {{.*}} uitofp <4 x i8> - ; AVX2: cost of 2 {{.*}} uitofp <4 x i8> - ; AVX512: cost of 2 {{.*}} uitofp <4 x i8> %cvt_v4i8_v4f64 = uitofp <4 x i8> undef to <4 x double> - - ; SSE2: cost of 80 {{.*}} uitofp <8 x i8> - ; AVX1: cost of 5 {{.*}} uitofp <8 x i8> - ; AVX2: cost of 5 {{.*}} uitofp <8 x i8> - ; AVX512: cost of 2 {{.*}} uitofp <8 x i8> %cvt_v8i8_v8f64 = uitofp <8 x i8> undef to <8 x double> - ret i32 undef } -; CHECK-LABEL: 'uitofp_i16_double' define i32 @uitofp_i16_double() { - ; SSE2: cost of 1 {{.*}} uitofp i16 - ; AVX1: cost of 1 {{.*}} uitofp i16 - ; AVX2: cost of 1 {{.*}} uitofp i16 - ; AVX512: cost of 1 {{.*}} uitofp i16 +; SSE-LABEL: 'uitofp_i16_double' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i16_f64 = uitofp i16 undef to double +; SSE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cvt_v2i16_v2f64 = uitofp <2 x i16> undef to <2 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %cvt_v4i16_v4f64 = uitofp <4 x i16> undef to <4 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %cvt_v8i16_v8f64 = uitofp <8 x i16> undef to <8 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'uitofp_i16_double' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i16_f64 = uitofp i16 undef to double +; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i16_v2f64 = uitofp <2 x i16> undef to <2 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i16_v4f64 = uitofp <4 x i16> undef to <4 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cvt_v8i16_v8f64 = uitofp <8 x i16> undef to <8 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'uitofp_i16_double' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i16_f64 = uitofp i16 undef to double +; AVX512-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cvt_v2i16_v2f64 = uitofp <2 x i16> undef to <2 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i16_v4f64 = uitofp <4 x i16> undef to <4 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i16_v8f64 = uitofp <8 x i16> undef to <8 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i16_f64 = uitofp i16 undef to double - - ; SSE2: cost of 20 {{.*}} uitofp <2 x i16> - ; AVX1: cost of 4 {{.*}} uitofp <2 x i16> - ; AVX2: cost of 4 {{.*}} uitofp <2 x i16> - ; AVX512: cost of 5 {{.*}} uitofp <2 x i16> %cvt_v2i16_v2f64 = uitofp <2 x i16> undef to <2 x double> - - ; SSE2: cost of 40 {{.*}} uitofp <4 x i16> - ; AVX1: cost of 2 {{.*}} uitofp <4 x i16> - ; AVX2: cost of 2 {{.*}} uitofp <4 x i16> - ; AVX512: cost of 2 {{.*}} uitofp <4 x i16> %cvt_v4i16_v4f64 = uitofp <4 x i16> undef to <4 x double> - - ; SSE2: cost of 80 {{.*}} uitofp <8 x i16> - ; AVX1: cost of 5 {{.*}} uitofp <8 x i16> - ; AVX2: cost of 5 {{.*}} uitofp <8 x i16> - ; AVX512: cost of 2 {{.*}} uitofp <8 x i16> %cvt_v8i16_v8f64 = uitofp <8 x i16> undef to <8 x double> - ret i32 undef } -; CHECK-LABEL: 'uitofp_i32_double' define i32 @uitofp_i32_double() { - ; SSE2: cost of 1 {{.*}} uitofp i32 - ; AVX1: cost of 1 {{.*}} uitofp i32 - ; AVX2: cost of 1 {{.*}} uitofp i32 - ; AVX512: cost of 1 {{.*}} uitofp i32 +; SSE-LABEL: 'uitofp_i32_double' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f64 = uitofp i32 undef to double +; SSE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cvt_v2i32_v2f64 = uitofp <2 x i32> undef to <2 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %cvt_v4i32_v4f64 = uitofp <4 x i32> undef to <4 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %cvt_v8i32_v8f64 = uitofp <8 x i32> undef to <8 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'uitofp_i32_double' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f64 = uitofp i32 undef to double +; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cvt_v2i32_v2f64 = uitofp <2 x i32> undef to <2 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cvt_v4i32_v4f64 = uitofp <4 x i32> undef to <4 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cvt_v8i32_v8f64 = uitofp <8 x i32> undef to <8 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'uitofp_i32_double' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f64 = uitofp i32 undef to double +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i32_v2f64 = uitofp <2 x i32> undef to <2 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i32_v4f64 = uitofp <4 x i32> undef to <4 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i32_v8f64 = uitofp <8 x i32> undef to <8 x double> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i32_f64 = uitofp i32 undef to double - - ; SSE2: cost of 20 {{.*}} uitofp <2 x i32> - ; AVX1: cost of 6 {{.*}} uitofp <2 x i32> - ; AVX2: cost of 6 {{.*}} uitofp <2 x i32> - ; AVX512: cost of 1 {{.*}} uitofp <2 x i32> %cvt_v2i32_v2f64 = uitofp <2 x i32> undef to <2 x double> - - ; SSE2: cost of 40 {{.*}} uitofp <4 x i32> - ; AVX1: cost of 6 {{.*}} uitofp <4 x i32> - ; AVX2: cost of 6 {{.*}} uitofp <4 x i32> - ; AVX512: cost of 1 {{.*}} uitofp <4 x i32> %cvt_v4i32_v4f64 = uitofp <4 x i32> undef to <4 x double> - - ; SSE2: cost of 80 {{.*}} uitofp <8 x i32> - ; AVX1: cost of 13 {{.*}} uitofp <8 x i32> - ; AVX2: cost of 13 {{.*}} uitofp <8 x i32> - ; AVX512: cost of 1 {{.*}} uitofp <8 x i32> %cvt_v8i32_v8f64 = uitofp <8 x i32> undef to <8 x double> - ret i32 undef } -; CHECK-LABEL: 'uitofp_i64_double' define i32 @uitofp_i64_double() { - ; SSE2: cost of 1 {{.*}} uitofp i64 - ; AVX1: cost of 1 {{.*}} uitofp i64 - ; AVX2: cost of 1 {{.*}} uitofp i64 - ; AVX512: cost of 1 {{.*}} uitofp i64 +; SSE-LABEL: 'uitofp_i64_double' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f64 = uitofp i64 undef to double +; SSE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cvt_v2i64_v2f64 = uitofp <2 x i64> undef to <2 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %cvt_v4i64_v4f64 = uitofp <4 x i64> undef to <4 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %cvt_v8i64_v8f64 = uitofp <8 x i64> undef to <8 x double> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'uitofp_i64_double' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f64 = uitofp i64 undef to double +; AVX-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cvt_v2i64_v2f64 = uitofp <2 x i64> undef to <2 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cvt_v4i64_v4f64 = uitofp <4 x i64> undef to <4 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 41 for instruction: %cvt_v8i64_v8f64 = uitofp <8 x i64> undef to <8 x double> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'uitofp_i64_double' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f64 = uitofp i64 undef to double +; AVX512F-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cvt_v2i64_v2f64 = uitofp <2 x i64> undef to <2 x double> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cvt_v4i64_v4f64 = uitofp <4 x i64> undef to <4 x double> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %cvt_v8i64_v8f64 = uitofp <8 x i64> undef to <8 x double> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'uitofp_i64_double' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f64 = uitofp i64 undef to double +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i64_v2f64 = uitofp <2 x i64> undef to <2 x double> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i64_v4f64 = uitofp <4 x i64> undef to <4 x double> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i64_v8f64 = uitofp <8 x i64> undef to <8 x double> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i64_f64 = uitofp i64 undef to double - - ; SSE2: cost of 20 {{.*}} uitofp <2 x i64> - ; AVX1: cost of 10 {{.*}} uitofp <2 x i64> - ; AVX2: cost of 10 {{.*}} uitofp <2 x i64> - ; AVX512F: cost of 5 {{.*}} uitofp <2 x i64> - ; AVX512DQ: cost of 1 {{.*}} uitofp <2 x i64> %cvt_v2i64_v2f64 = uitofp <2 x i64> undef to <2 x double> - - ; SSE2: cost of 40 {{.*}} uitofp <4 x i64> - ; AVX1: cost of 20 {{.*}} uitofp <4 x i64> - ; AVX2: cost of 20 {{.*}} uitofp <4 x i64> - ; AVX512F: cost of 12 {{.*}} uitofp <4 x i64> - ; AVX512DQ: cost of 1 {{.*}} uitofp <4 x i64> %cvt_v4i64_v4f64 = uitofp <4 x i64> undef to <4 x double> - - ; SSE2: cost of 80 {{.*}} uitofp <8 x i64> - ; AVX1: cost of 41 {{.*}} uitofp <8 x i64> - ; AVX2: cost of 41 {{.*}} uitofp <8 x i64> - ; AVX512F: cost of 26 {{.*}} uitofp <8 x i64> - ; AVX512DQ: cost of 1 {{.*}} uitofp <8 x i64> %cvt_v8i64_v8f64 = uitofp <8 x i64> undef to <8 x double> - ret i32 undef } -; CHECK-LABEL: 'uitofp_i8_float' define i32 @uitofp_i8_float() { - ; SSE2: cost of 1 {{.*}} uitofp i8 - ; AVX1: cost of 1 {{.*}} uitofp i8 - ; AVX2: cost of 1 {{.*}} uitofp i8 - ; AVX512: cost of 1 {{.*}} uitofp i8 +; SSE-LABEL: 'uitofp_i8_float' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i8_f32 = uitofp i8 undef to float +; SSE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %cvt_v4i8_v4f32 = uitofp <4 x i8> undef to <4 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %cvt_v8i8_v8f32 = uitofp <8 x i8> undef to <8 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %cvt_v16i8_v16f32 = uitofp <16 x i8> undef to <16 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'uitofp_i8_float' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i8_f32 = uitofp i8 undef to float +; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i8_v4f32 = uitofp <4 x i8> undef to <4 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cvt_v8i8_v8f32 = uitofp <8 x i8> undef to <8 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %cvt_v16i8_v16f32 = uitofp <16 x i8> undef to <16 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'uitofp_i8_float' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i8_f32 = uitofp i8 undef to float +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i8_v4f32 = uitofp <4 x i8> undef to <4 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i8_v8f32 = uitofp <8 x i8> undef to <8 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v16i8_v16f32 = uitofp <16 x i8> undef to <16 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i8_f32 = uitofp i8 undef to float - - ; SSE2: cost of 8 {{.*}} uitofp <4 x i8> - ; AVX1: cost of 2 {{.*}} uitofp <4 x i8> - ; AVX2: cost of 2 {{.*}} uitofp <4 x i8> - ; AVX512: cost of 2 {{.*}} uitofp <4 x i8> %cvt_v4i8_v4f32 = uitofp <4 x i8> undef to <4 x float> - - ; SSE2: cost of 15 {{.*}} uitofp <8 x i8> - ; AVX1: cost of 5 {{.*}} uitofp <8 x i8> - ; AVX2: cost of 5 {{.*}} uitofp <8 x i8> - ; AVX512: cost of 2 {{.*}} uitofp <8 x i8> %cvt_v8i8_v8f32 = uitofp <8 x i8> undef to <8 x float> - - ; SSE2: cost of 8 {{.*}} uitofp <16 x i8> - ; AVX1: cost of 11 {{.*}} uitofp <16 x i8> - ; AVX16: cost of 11 {{.*}} uitofp <16 x i8> - ; AVX512: cost of 2 {{.*}} uitofp <16 x i8> %cvt_v16i8_v16f32 = uitofp <16 x i8> undef to <16 x float> - ret i32 undef } -; CHECK-LABEL: 'uitofp_i16_float' define i32 @uitofp_i16_float() { - ; SSE2: cost of 1 {{.*}} uitofp i16 - ; AVX1: cost of 1 {{.*}} uitofp i16 - ; AVX2: cost of 1 {{.*}} uitofp i16 - ; AVX512: cost of 1 {{.*}} uitofp i16 +; SSE-LABEL: 'uitofp_i16_float' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i16_f32 = uitofp i16 undef to float +; SSE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %cvt_v4i16_v4f32 = uitofp <4 x i16> undef to <4 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %cvt_v8i16_v8f32 = uitofp <8 x i16> undef to <8 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %cvt_v16i16_v16f32 = uitofp <16 x i16> undef to <16 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'uitofp_i16_float' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i16_f32 = uitofp i16 undef to float +; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i16_v4f32 = uitofp <4 x i16> undef to <4 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cvt_v8i16_v8f32 = uitofp <8 x i16> undef to <8 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %cvt_v16i16_v16f32 = uitofp <16 x i16> undef to <16 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'uitofp_i16_float' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i16_f32 = uitofp i16 undef to float +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i16_v4f32 = uitofp <4 x i16> undef to <4 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i16_v8f32 = uitofp <8 x i16> undef to <8 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cvt_v16i16_v16f32 = uitofp <16 x i16> undef to <16 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i16_f32 = uitofp i16 undef to float - - ; SSE2: cost of 8 {{.*}} uitofp <4 x i16> - ; AVX1: cost of 2 {{.*}} uitofp <4 x i16> - ; AVX2: cost of 2 {{.*}} uitofp <4 x i16> - ; AVX512: cost of 2 {{.*}} uitofp <4 x i16> %cvt_v4i16_v4f32 = uitofp <4 x i16> undef to <4 x float> - - ; SSE2: cost of 15 {{.*}} uitofp <8 x i16> - ; AVX1: cost of 5 {{.*}} uitofp <8 x i16> - ; AVX2: cost of 5 {{.*}} uitofp <8 x i16> - ; AVX512: cost of 2 {{.*}} uitofp <8 x i16> %cvt_v8i16_v8f32 = uitofp <8 x i16> undef to <8 x float> - - ; SSE2: cost of 30 {{.*}} uitofp <16 x i16> - ; AVX1: cost of 11 {{.*}} uitofp <16 x i16> - ; AVX16: cost of 11 {{.*}} uitofp <16 x i16> - ; AVX512: cost of 2 {{.*}} uitofp <16 x i16> %cvt_v16i16_v16f32 = uitofp <16 x i16> undef to <16 x float> - ret i32 undef } -; CHECK-LABEL: 'uitofp_i32_float' define i32 @uitofp_i32_float() { - ; SSE2: cost of 1 {{.*}} uitofp i32 - ; AVX1: cost of 1 {{.*}} uitofp i32 - ; AVX2: cost of 1 {{.*}} uitofp i32 - ; AVX512: cost of 1 {{.*}} uitofp i32 +; SSE-LABEL: 'uitofp_i32_float' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f32 = uitofp i32 undef to float +; SSE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %cvt_v4i32_v4f32 = uitofp <4 x i32> undef to <4 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %cvt_v8i32_v8f32 = uitofp <8 x i32> undef to <8 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %cvt_v16i32_v16f32 = uitofp <16 x i32> undef to <16 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX1-LABEL: 'uitofp_i32_float' +; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f32 = uitofp i32 undef to float +; AVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cvt_v4i32_v4f32 = uitofp <4 x i32> undef to <4 x float> +; AVX1-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cvt_v8i32_v8f32 = uitofp <8 x i32> undef to <8 x float> +; AVX1-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %cvt_v16i32_v16f32 = uitofp <16 x i32> undef to <16 x float> +; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX2-LABEL: 'uitofp_i32_float' +; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f32 = uitofp i32 undef to float +; AVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cvt_v4i32_v4f32 = uitofp <4 x i32> undef to <4 x float> +; AVX2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %cvt_v8i32_v8f32 = uitofp <8 x i32> undef to <8 x float> +; AVX2-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %cvt_v16i32_v16f32 = uitofp <16 x i32> undef to <16 x float> +; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512-LABEL: 'uitofp_i32_float' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f32 = uitofp i32 undef to float +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i32_v4f32 = uitofp <4 x i32> undef to <4 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i32_v8f32 = uitofp <8 x i32> undef to <8 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v16i32_v16f32 = uitofp <16 x i32> undef to <16 x float> +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i32_f32 = uitofp i32 undef to float - - ; SSE2: cost of 8 {{.*}} uitofp <4 x i32> - ; AVX1: cost of 6 {{.*}} uitofp <4 x i32> - ; AVX2: cost of 6 {{.*}} uitofp <4 x i32> - ; AVX512: cost of 1 {{.*}} uitofp <4 x i32> %cvt_v4i32_v4f32 = uitofp <4 x i32> undef to <4 x float> - - ; SSE2: cost of 16 {{.*}} uitofp <8 x i32> - ; AVX1: cost of 9 {{.*}} uitofp <8 x i32> - ; AVX2: cost of 8 {{.*}} uitofp <8 x i32> - ; AVX512: cost of 1 {{.*}} uitofp <8 x i32> %cvt_v8i32_v8f32 = uitofp <8 x i32> undef to <8 x float> - - ; SSE2: cost of 32 {{.*}} uitofp <16 x i32> - ; AVX1: cost of 19 {{.*}} uitofp <16 x i32> - ; AVX2: cost of 17 {{.*}} uitofp <16 x i32> - ; AVX512: cost of 1 {{.*}} uitofp <16 x i32> %cvt_v16i32_v16f32 = uitofp <16 x i32> undef to <16 x float> - ret i32 undef } -; CHECK-LABEL: 'uitofp_i64_float' define i32 @uitofp_i64_float() { - ; SSE2: cost of 1 {{.*}} uitofp i64 - ; AVX1: cost of 1 {{.*}} uitofp i64 - ; AVX2: cost of 1 {{.*}} uitofp i64 - ; AVX512: cost of 1 {{.*}} uitofp i64 +; SSE-LABEL: 'uitofp_i64_float' +; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f32 = uitofp i64 undef to float +; SSE-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %cvt_v2i64_v2f32 = uitofp <2 x i64> undef to <2 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %cvt_v4i64_v4f32 = uitofp <4 x i64> undef to <4 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %cvt_v8i64_v8f32 = uitofp <8 x i64> undef to <8 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 120 for instruction: %cvt_v16i64_v16f32 = uitofp <16 x i64> undef to <16 x float> +; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX-LABEL: 'uitofp_i64_float' +; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f32 = uitofp i64 undef to float +; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i64_v2f32 = uitofp <2 x i64> undef to <2 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cvt_v4i64_v4f32 = uitofp <4 x i64> undef to <4 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %cvt_v8i64_v8f32 = uitofp <8 x i64> undef to <8 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %cvt_v16i64_v16f32 = uitofp <16 x i64> undef to <16 x float> +; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512F-LABEL: 'uitofp_i64_float' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f32 = uitofp i64 undef to float +; AVX512F-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cvt_v2i64_v2f32 = uitofp <2 x i64> undef to <2 x float> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cvt_v4i64_v4f32 = uitofp <4 x i64> undef to <4 x float> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %cvt_v8i64_v8f32 = uitofp <8 x i64> undef to <8 x float> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 53 for instruction: %cvt_v16i64_v16f32 = uitofp <16 x i64> undef to <16 x float> +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; AVX512DQ-LABEL: 'uitofp_i64_float' +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f32 = uitofp i64 undef to float +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i64_v2f32 = uitofp <2 x i64> undef to <2 x float> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i64_v4f32 = uitofp <4 x i64> undef to <4 x float> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i64_v8f32 = uitofp <8 x i64> undef to <8 x float> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cvt_v16i64_v16f32 = uitofp <16 x i64> undef to <16 x float> +; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; %cvt_i64_f32 = uitofp i64 undef to float - - ; SSE2: cost of 15 {{.*}} uitofp <2 x i64> - ; AVX1: cost of 4 {{.*}} uitofp <2 x i64> - ; AVX2: cost of 4 {{.*}} uitofp <2 x i64> - ; AVX512F: cost of 5 {{.*}} uitofp <2 x i64> - ; AVX512DQ: cost of 1 {{.*}} uitofp <2 x i64> %cvt_v2i64_v2f32 = uitofp <2 x i64> undef to <2 x float> - - ; SSE2: cost of 30 {{.*}} uitofp <4 x i64> - ; AVX1: cost of 10 {{.*}} uitofp <4 x i64> - ; AVX2: cost of 10 {{.*}} uitofp <4 x i64> - ; AVX512F: cost of 10 {{.*}} uitofp <4 x i64> - ; AVX512DQ: cost of 1 {{.*}} uitofp <4 x i64> %cvt_v4i64_v4f32 = uitofp <4 x i64> undef to <4 x float> - - ; SSE2: cost of 60 {{.*}} uitofp <8 x i64> - ; AVX1: cost of 21 {{.*}} uitofp <8 x i64> - ; AVX2: cost of 21 {{.*}} uitofp <8 x i64> - ; AVX512F: cost of 26 {{.*}} uitofp <8 x i64> - ; AVX512DQ: cost of 1 {{.*}} uitofp <8 x i64> %cvt_v8i64_v8f32 = uitofp <8 x i64> undef to <8 x float> - - ; SSE2: cost of 120 {{.*}} uitofp <16 x i64> - ; AVX1: cost of 43 {{.*}} uitofp <16 x i64> - ; AVX2: cost of 43 {{.*}} uitofp <16 x i64> - ; AVX512F: cost of 53 {{.*}} uitofp <16 x i64> - ; AVX512DQ: cost of 3 {{.*}} uitofp <16 x i64> %cvt_v16i64_v16f32 = uitofp <16 x i64> undef to <16 x float> - ret i32 undef } -- 2.7.4