blob: 30e4c108710bb7c749f7faf561c7d4a708035138 [file] [edit]
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+sse2 | FileCheck %s --check-prefixes=SSE2
; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE42
; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1
; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2
; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F
; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=AVX512,AVX512DQ
;
; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mcpu=slm | FileCheck %s --check-prefixes=SLM
; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mcpu=goldmont | FileCheck %s --check-prefixes=SSE42
; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mcpu=btver2 | FileCheck %s --check-prefixes=AVX,AVX1
define i32 @fptosi_double_i64(i32 %arg) {
; SSE2-LABEL: 'fptosi_double_i64'
; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:1 SizeLat:1 for: %I64 = fptosi double undef to i64
; SSE2-NEXT: Cost Model: Found costs of RThru:14 CodeSize:1 Lat:1 SizeLat:1 for: %V2I64 = fptosi <2 x double> undef to <2 x i64>
; SSE2-NEXT: Cost Model: Found costs of RThru:28 CodeSize:1 Lat:1 SizeLat:1 for: %V4I64 = fptosi <4 x double> undef to <4 x i64>
; SSE2-NEXT: Cost Model: Found costs of RThru:56 CodeSize:1 Lat:1 SizeLat:1 for: %V8I64 = fptosi <8 x double> undef to <8 x i64>
; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SSE42-LABEL: 'fptosi_double_i64'
; SSE42-NEXT: Cost Model: Found costs of 1 for: %I64 = fptosi double undef to i64
; SSE42-NEXT: Cost Model: Found costs of RThru:6 CodeSize:1 Lat:1 SizeLat:1 for: %V2I64 = fptosi <2 x double> undef to <2 x i64>
; SSE42-NEXT: Cost Model: Found costs of RThru:12 CodeSize:1 Lat:1 SizeLat:1 for: %V4I64 = fptosi <4 x double> undef to <4 x i64>
; SSE42-NEXT: Cost Model: Found costs of RThru:24 CodeSize:1 Lat:1 SizeLat:1 for: %V8I64 = fptosi <8 x double> undef to <8 x i64>
; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX-LABEL: 'fptosi_double_i64'
; AVX-NEXT: Cost Model: Found costs of 1 for: %I64 = fptosi double undef to i64
; AVX-NEXT: Cost Model: Found costs of RThru:6 CodeSize:1 Lat:1 SizeLat:1 for: %V2I64 = fptosi <2 x double> undef to <2 x i64>
; AVX-NEXT: Cost Model: Found costs of RThru:14 CodeSize:1 Lat:1 SizeLat:1 for: %V4I64 = fptosi <4 x double> undef to <4 x i64>
; AVX-NEXT: Cost Model: Found costs of RThru:28 CodeSize:1 Lat:1 SizeLat:1 for: %V8I64 = fptosi <8 x double> undef to <8 x i64>
; AVX-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX512F-LABEL: 'fptosi_double_i64'
; AVX512F-NEXT: Cost Model: Found costs of 1 for: %I64 = fptosi double undef to i64
; AVX512F-NEXT: Cost Model: Found costs of RThru:6 CodeSize:1 Lat:1 SizeLat:1 for: %V2I64 = fptosi <2 x double> undef to <2 x i64>
; AVX512F-NEXT: Cost Model: Found costs of RThru:14 CodeSize:1 Lat:1 SizeLat:1 for: %V4I64 = fptosi <4 x double> undef to <4 x i64>
; AVX512F-NEXT: Cost Model: Found costs of RThru:30 CodeSize:1 Lat:1 SizeLat:1 for: %V8I64 = fptosi <8 x double> undef to <8 x i64>
; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX512DQ-LABEL: 'fptosi_double_i64'
; AVX512DQ-NEXT: Cost Model: Found costs of 1 for: %I64 = fptosi double undef to i64
; AVX512DQ-NEXT: Cost Model: Found costs of 1 for: %V2I64 = fptosi <2 x double> undef to <2 x i64>
; AVX512DQ-NEXT: Cost Model: Found costs of 1 for: %V4I64 = fptosi <4 x double> undef to <4 x i64>
; AVX512DQ-NEXT: Cost Model: Found costs of 1 for: %V8I64 = fptosi <8 x double> undef to <8 x i64>
; AVX512DQ-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SLM-LABEL: 'fptosi_double_i64'
; SLM-NEXT: Cost Model: Found costs of 1 for: %I64 = fptosi double undef to i64
; SLM-NEXT: Cost Model: Found costs of RThru:12 CodeSize:1 Lat:1 SizeLat:1 for: %V2I64 = fptosi <2 x double> undef to <2 x i64>
; SLM-NEXT: Cost Model: Found costs of RThru:24 CodeSize:1 Lat:1 SizeLat:1 for: %V4I64 = fptosi <4 x double> undef to <4 x i64>
; SLM-NEXT: Cost Model: Found costs of RThru:48 CodeSize:1 Lat:1 SizeLat:1 for: %V8I64 = fptosi <8 x double> undef to <8 x i64>
; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
%I64 = fptosi double undef to i64
%V2I64 = fptosi <2 x double> undef to <2 x i64>
%V4I64 = fptosi <4 x double> undef to <4 x i64>
%V8I64 = fptosi <8 x double> undef to <8 x i64>
ret i32 undef
}
define i32 @fptosi_double_i32(i32 %arg) {
; SSE2-LABEL: 'fptosi_double_i32'
; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:1 SizeLat:1 for: %I32 = fptosi double undef to i32
; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:1 SizeLat:1 for: %V2I32 = fptosi <2 x double> undef to <2 x i32>
; SSE2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:2 SizeLat:2 for: %V4I32 = fptosi <4 x double> undef to <4 x i32>
; SSE2-NEXT: Cost Model: Found costs of RThru:16 CodeSize:4 Lat:4 SizeLat:4 for: %V8I32 = fptosi <8 x double> undef to <8 x i32>
; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SSE42-LABEL: 'fptosi_double_i32'
; SSE42-NEXT: Cost Model: Found costs of 1 for: %I32 = fptosi double undef to i32
; SSE42-NEXT: Cost Model: Found costs of 1 for: %V2I32 = fptosi <2 x double> undef to <2 x i32>
; SSE42-NEXT: Cost Model: Found costs of 2 for: %V4I32 = fptosi <4 x double> undef to <4 x i32>
; SSE42-NEXT: Cost Model: Found costs of 4 for: %V8I32 = fptosi <8 x double> undef to <8 x i32>
; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX1-LABEL: 'fptosi_double_i32'
; AVX1-NEXT: Cost Model: Found costs of 1 for: %I32 = fptosi double undef to i32
; AVX1-NEXT: Cost Model: Found costs of 1 for: %V2I32 = fptosi <2 x double> undef to <2 x i32>
; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V4I32 = fptosi <4 x double> undef to <4 x i32>
; AVX1-NEXT: Cost Model: Found costs of RThru:5 CodeSize:1 Lat:1 SizeLat:1 for: %V8I32 = fptosi <8 x double> undef to <8 x i32>
; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX2-LABEL: 'fptosi_double_i32'
; AVX2-NEXT: Cost Model: Found costs of 1 for: %I32 = fptosi double undef to i32
; AVX2-NEXT: Cost Model: Found costs of 1 for: %V2I32 = fptosi <2 x double> undef to <2 x i32>
; AVX2-NEXT: Cost Model: Found costs of 1 for: %V4I32 = fptosi <4 x double> undef to <4 x i32>
; AVX2-NEXT: Cost Model: Found costs of RThru:3 CodeSize:1 Lat:1 SizeLat:1 for: %V8I32 = fptosi <8 x double> undef to <8 x i32>
; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX512-LABEL: 'fptosi_double_i32'
; AVX512-NEXT: Cost Model: Found costs of 1 for: %I32 = fptosi double undef to i32
; AVX512-NEXT: Cost Model: Found costs of 1 for: %V2I32 = fptosi <2 x double> undef to <2 x i32>
; AVX512-NEXT: Cost Model: Found costs of 1 for: %V4I32 = fptosi <4 x double> undef to <4 x i32>
; AVX512-NEXT: Cost Model: Found costs of 1 for: %V8I32 = fptosi <8 x double> undef to <8 x i32>
; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SLM-LABEL: 'fptosi_double_i32'
; SLM-NEXT: Cost Model: Found costs of 1 for: %I32 = fptosi double undef to i32
; SLM-NEXT: Cost Model: Found costs of 1 for: %V2I32 = fptosi <2 x double> undef to <2 x i32>
; SLM-NEXT: Cost Model: Found costs of 2 for: %V4I32 = fptosi <4 x double> undef to <4 x i32>
; SLM-NEXT: Cost Model: Found costs of 4 for: %V8I32 = fptosi <8 x double> undef to <8 x i32>
; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
%I32 = fptosi double undef to i32
%V2I32 = fptosi <2 x double> undef to <2 x i32>
%V4I32 = fptosi <4 x double> undef to <4 x i32>
%V8I32 = fptosi <8 x double> undef to <8 x i32>
ret i32 undef
}
define i32 @fptosi_double_i16(i32 %arg) {
; SSE2-LABEL: 'fptosi_double_i16'
; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:1 SizeLat:1 for: %I16 = fptosi double undef to i16
; SSE2-NEXT: Cost Model: Found costs of RThru:5 CodeSize:1 Lat:1 SizeLat:1 for: %V2I16 = fptosi <2 x double> undef to <2 x i16>
; SSE2-NEXT: Cost Model: Found costs of RThru:10 CodeSize:2 Lat:2 SizeLat:2 for: %V4I16 = fptosi <4 x double> undef to <4 x i16>
; SSE2-NEXT: Cost Model: Found costs of RThru:20 CodeSize:4 Lat:4 SizeLat:4 for: %V8I16 = fptosi <8 x double> undef to <8 x i16>
; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SSE42-LABEL: 'fptosi_double_i16'
; SSE42-NEXT: Cost Model: Found costs of 1 for: %I16 = fptosi double undef to i16
; SSE42-NEXT: Cost Model: Found costs of 1 for: %V2I16 = fptosi <2 x double> undef to <2 x i16>
; SSE42-NEXT: Cost Model: Found costs of 2 for: %V4I16 = fptosi <4 x double> undef to <4 x i16>
; SSE42-NEXT: Cost Model: Found costs of 4 for: %V8I16 = fptosi <8 x double> undef to <8 x i16>
; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX-LABEL: 'fptosi_double_i16'
; AVX-NEXT: Cost Model: Found costs of 1 for: %I16 = fptosi double undef to i16
; AVX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = fptosi <2 x double> undef to <2 x i16>
; AVX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V4I16 = fptosi <4 x double> undef to <4 x i16>
; AVX-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:2 SizeLat:2 for: %V8I16 = fptosi <8 x double> undef to <8 x i16>
; AVX-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX512-LABEL: 'fptosi_double_i16'
; AVX512-NEXT: Cost Model: Found costs of 1 for: %I16 = fptosi double undef to i16
; AVX512-NEXT: Cost Model: Found costs of 1 for: %V2I16 = fptosi <2 x double> undef to <2 x i16>
; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V4I16 = fptosi <4 x double> undef to <4 x i16>
; AVX512-NEXT: Cost Model: Found costs of RThru:3 CodeSize:1 Lat:1 SizeLat:1 for: %V8I16 = fptosi <8 x double> undef to <8 x i16>
; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SLM-LABEL: 'fptosi_double_i16'
; SLM-NEXT: Cost Model: Found costs of 1 for: %I16 = fptosi double undef to i16
; SLM-NEXT: Cost Model: Found costs of 1 for: %V2I16 = fptosi <2 x double> undef to <2 x i16>
; SLM-NEXT: Cost Model: Found costs of 2 for: %V4I16 = fptosi <4 x double> undef to <4 x i16>
; SLM-NEXT: Cost Model: Found costs of 4 for: %V8I16 = fptosi <8 x double> undef to <8 x i16>
; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
%I16 = fptosi double undef to i16
%V2I16 = fptosi <2 x double> undef to <2 x i16>
%V4I16 = fptosi <4 x double> undef to <4 x i16>
%V8I16 = fptosi <8 x double> undef to <8 x i16>
ret i32 undef
}
define i32 @fptosi_double_i8(i32 %arg) {
; SSE2-LABEL: 'fptosi_double_i8'
; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:1 SizeLat:1 for: %I8 = fptosi double undef to i8
; SSE2-NEXT: Cost Model: Found costs of RThru:6 CodeSize:1 Lat:1 SizeLat:1 for: %V2I8 = fptosi <2 x double> undef to <2 x i8>
; SSE2-NEXT: Cost Model: Found costs of RThru:12 CodeSize:2 Lat:2 SizeLat:2 for: %V4I8 = fptosi <4 x double> undef to <4 x i8>
; SSE2-NEXT: Cost Model: Found costs of RThru:24 CodeSize:4 Lat:4 SizeLat:4 for: %V8I8 = fptosi <8 x double> undef to <8 x i8>
; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SSE42-LABEL: 'fptosi_double_i8'
; SSE42-NEXT: Cost Model: Found costs of 1 for: %I8 = fptosi double undef to i8
; SSE42-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V2I8 = fptosi <2 x double> undef to <2 x i8>
; SSE42-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:2 SizeLat:2 for: %V4I8 = fptosi <4 x double> undef to <4 x i8>
; SSE42-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:4 SizeLat:4 for: %V8I8 = fptosi <8 x double> undef to <8 x i8>
; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX-LABEL: 'fptosi_double_i8'
; AVX-NEXT: Cost Model: Found costs of 1 for: %I8 = fptosi double undef to i8
; AVX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V2I8 = fptosi <2 x double> undef to <2 x i8>
; AVX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V4I8 = fptosi <4 x double> undef to <4 x i8>
; AVX-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:2 SizeLat:2 for: %V8I8 = fptosi <8 x double> undef to <8 x i8>
; AVX-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX512-LABEL: 'fptosi_double_i8'
; AVX512-NEXT: Cost Model: Found costs of 1 for: %I8 = fptosi double undef to i8
; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V2I8 = fptosi <2 x double> undef to <2 x i8>
; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V4I8 = fptosi <4 x double> undef to <4 x i8>
; AVX512-NEXT: Cost Model: Found costs of RThru:3 CodeSize:2 Lat:2 SizeLat:2 for: %V8I8 = fptosi <8 x double> undef to <8 x i8>
; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SLM-LABEL: 'fptosi_double_i8'
; SLM-NEXT: Cost Model: Found costs of 1 for: %I8 = fptosi double undef to i8
; SLM-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V2I8 = fptosi <2 x double> undef to <2 x i8>
; SLM-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:2 SizeLat:2 for: %V4I8 = fptosi <4 x double> undef to <4 x i8>
; SLM-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:4 SizeLat:4 for: %V8I8 = fptosi <8 x double> undef to <8 x i8>
; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
%I8 = fptosi double undef to i8
%V2I8 = fptosi <2 x double> undef to <2 x i8>
%V4I8 = fptosi <4 x double> undef to <4 x i8>
%V8I8 = fptosi <8 x double> undef to <8 x i8>
ret i32 undef
}
define i32 @fptosi_float_i64(i32 %arg) {
; SSE2-LABEL: 'fptosi_float_i64'
; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:1 SizeLat:1 for: %I64 = fptosi float undef to i64
; SSE2-NEXT: Cost Model: Found costs of RThru:14 CodeSize:1 Lat:1 SizeLat:1 for: %V2I64 = fptosi <2 x float> undef to <2 x i64>
; SSE2-NEXT: Cost Model: Found costs of RThru:29 CodeSize:1 Lat:1 SizeLat:1 for: %V4I64 = fptosi <4 x float> undef to <4 x i64>
; SSE2-NEXT: Cost Model: Found costs of RThru:58 CodeSize:1 Lat:1 SizeLat:1 for: %V8I64 = fptosi <8 x float> undef to <8 x i64>
; SSE2-NEXT: Cost Model: Found costs of RThru:116 CodeSize:1 Lat:1 SizeLat:1 for: %V16I64 = fptosi <16 x float> undef to <16 x i64>
; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SSE42-LABEL: 'fptosi_float_i64'
; SSE42-NEXT: Cost Model: Found costs of 1 for: %I64 = fptosi float undef to i64
; SSE42-NEXT: Cost Model: Found costs of RThru:6 CodeSize:1 Lat:1 SizeLat:1 for: %V2I64 = fptosi <2 x float> undef to <2 x i64>
; SSE42-NEXT: Cost Model: Found costs of RThru:13 CodeSize:1 Lat:1 SizeLat:1 for: %V4I64 = fptosi <4 x float> undef to <4 x i64>
; SSE42-NEXT: Cost Model: Found costs of RThru:26 CodeSize:1 Lat:1 SizeLat:1 for: %V8I64 = fptosi <8 x float> undef to <8 x i64>
; SSE42-NEXT: Cost Model: Found costs of RThru:52 CodeSize:1 Lat:1 SizeLat:1 for: %V16I64 = fptosi <16 x float> undef to <16 x i64>
; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX-LABEL: 'fptosi_float_i64'
; AVX-NEXT: Cost Model: Found costs of 1 for: %I64 = fptosi float undef to i64
; AVX-NEXT: Cost Model: Found costs of RThru:6 CodeSize:1 Lat:1 SizeLat:1 for: %V2I64 = fptosi <2 x float> undef to <2 x i64>
; AVX-NEXT: Cost Model: Found costs of RThru:14 CodeSize:1 Lat:1 SizeLat:1 for: %V4I64 = fptosi <4 x float> undef to <4 x i64>
; AVX-NEXT: Cost Model: Found costs of RThru:29 CodeSize:1 Lat:1 SizeLat:1 for: %V8I64 = fptosi <8 x float> undef to <8 x i64>
; AVX-NEXT: Cost Model: Found costs of RThru:58 CodeSize:1 Lat:1 SizeLat:1 for: %V16I64 = fptosi <16 x float> undef to <16 x i64>
; AVX-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX512F-LABEL: 'fptosi_float_i64'
; AVX512F-NEXT: Cost Model: Found costs of 1 for: %I64 = fptosi float undef to i64
; AVX512F-NEXT: Cost Model: Found costs of RThru:6 CodeSize:1 Lat:1 SizeLat:1 for: %V2I64 = fptosi <2 x float> undef to <2 x i64>
; AVX512F-NEXT: Cost Model: Found costs of RThru:14 CodeSize:1 Lat:1 SizeLat:1 for: %V4I64 = fptosi <4 x float> undef to <4 x i64>
; AVX512F-NEXT: Cost Model: Found costs of RThru:30 CodeSize:1 Lat:1 SizeLat:1 for: %V8I64 = fptosi <8 x float> undef to <8 x i64>
; AVX512F-NEXT: Cost Model: Found costs of RThru:61 CodeSize:1 Lat:1 SizeLat:1 for: %V16I64 = fptosi <16 x float> undef to <16 x i64>
; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX512DQ-LABEL: 'fptosi_float_i64'
; AVX512DQ-NEXT: Cost Model: Found costs of 1 for: %I64 = fptosi float undef to i64
; AVX512DQ-NEXT: Cost Model: Found costs of 1 for: %V2I64 = fptosi <2 x float> undef to <2 x i64>
; AVX512DQ-NEXT: Cost Model: Found costs of 1 for: %V4I64 = fptosi <4 x float> undef to <4 x i64>
; AVX512DQ-NEXT: Cost Model: Found costs of 1 for: %V8I64 = fptosi <8 x float> undef to <8 x i64>
; AVX512DQ-NEXT: Cost Model: Found costs of RThru:3 CodeSize:1 Lat:1 SizeLat:1 for: %V16I64 = fptosi <16 x float> undef to <16 x i64>
; AVX512DQ-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SLM-LABEL: 'fptosi_float_i64'
; SLM-NEXT: Cost Model: Found costs of 1 for: %I64 = fptosi float undef to i64
; SLM-NEXT: Cost Model: Found costs of RThru:12 CodeSize:1 Lat:1 SizeLat:1 for: %V2I64 = fptosi <2 x float> undef to <2 x i64>
; SLM-NEXT: Cost Model: Found costs of RThru:25 CodeSize:1 Lat:1 SizeLat:1 for: %V4I64 = fptosi <4 x float> undef to <4 x i64>
; SLM-NEXT: Cost Model: Found costs of RThru:50 CodeSize:1 Lat:1 SizeLat:1 for: %V8I64 = fptosi <8 x float> undef to <8 x i64>
; SLM-NEXT: Cost Model: Found costs of RThru:100 CodeSize:1 Lat:1 SizeLat:1 for: %V16I64 = fptosi <16 x float> undef to <16 x i64>
; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
%I64 = fptosi float undef to i64
%V2I64 = fptosi <2 x float> undef to <2 x i64>
%V4I64 = fptosi <4 x float> undef to <4 x i64>
%V8I64 = fptosi <8 x float> undef to <8 x i64>
%V16I64 = fptosi <16 x float> undef to <16 x i64>
ret i32 undef
}
define i32 @fptosi_float_i32(i32 %arg) {
; SSE2-LABEL: 'fptosi_float_i32'
; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:1 SizeLat:1 for: %I32 = fptosi float undef to i32
; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:1 SizeLat:1 for: %V2I32 = fptosi <2 x float> undef to <2 x i32>
; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:1 SizeLat:1 for: %V4I32 = fptosi <4 x float> undef to <4 x i32>
; SSE2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:2 SizeLat:2 for: %V8I32 = fptosi <8 x float> undef to <8 x i32>
; SSE2-NEXT: Cost Model: Found costs of RThru:16 CodeSize:4 Lat:4 SizeLat:4 for: %V16I32 = fptosi <16 x float> undef to <16 x i32>
; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SSE42-LABEL: 'fptosi_float_i32'
; SSE42-NEXT: Cost Model: Found costs of 1 for: %I32 = fptosi float undef to i32
; SSE42-NEXT: Cost Model: Found costs of 1 for: %V2I32 = fptosi <2 x float> undef to <2 x i32>
; SSE42-NEXT: Cost Model: Found costs of 1 for: %V4I32 = fptosi <4 x float> undef to <4 x i32>
; SSE42-NEXT: Cost Model: Found costs of 2 for: %V8I32 = fptosi <8 x float> undef to <8 x i32>
; SSE42-NEXT: Cost Model: Found costs of 4 for: %V16I32 = fptosi <16 x float> undef to <16 x i32>
; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX1-LABEL: 'fptosi_float_i32'
; AVX1-NEXT: Cost Model: Found costs of 1 for: %I32 = fptosi float undef to i32
; AVX1-NEXT: Cost Model: Found costs of 1 for: %V2I32 = fptosi <2 x float> undef to <2 x i32>
; AVX1-NEXT: Cost Model: Found costs of 1 for: %V4I32 = fptosi <4 x float> undef to <4 x i32>
; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V8I32 = fptosi <8 x float> undef to <8 x i32>
; AVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:2 SizeLat:2 for: %V16I32 = fptosi <16 x float> undef to <16 x i32>
; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX2-LABEL: 'fptosi_float_i32'
; AVX2-NEXT: Cost Model: Found costs of 1 for: %I32 = fptosi float undef to i32
; AVX2-NEXT: Cost Model: Found costs of 1 for: %V2I32 = fptosi <2 x float> undef to <2 x i32>
; AVX2-NEXT: Cost Model: Found costs of 1 for: %V4I32 = fptosi <4 x float> undef to <4 x i32>
; AVX2-NEXT: Cost Model: Found costs of 1 for: %V8I32 = fptosi <8 x float> undef to <8 x i32>
; AVX2-NEXT: Cost Model: Found costs of 2 for: %V16I32 = fptosi <16 x float> undef to <16 x i32>
; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX512-LABEL: 'fptosi_float_i32'
; AVX512-NEXT: Cost Model: Found costs of 1 for: %I32 = fptosi float undef to i32
; AVX512-NEXT: Cost Model: Found costs of 1 for: %V2I32 = fptosi <2 x float> undef to <2 x i32>
; AVX512-NEXT: Cost Model: Found costs of 1 for: %V4I32 = fptosi <4 x float> undef to <4 x i32>
; AVX512-NEXT: Cost Model: Found costs of 1 for: %V8I32 = fptosi <8 x float> undef to <8 x i32>
; AVX512-NEXT: Cost Model: Found costs of 1 for: %V16I32 = fptosi <16 x float> undef to <16 x i32>
; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SLM-LABEL: 'fptosi_float_i32'
; SLM-NEXT: Cost Model: Found costs of 1 for: %I32 = fptosi float undef to i32
; SLM-NEXT: Cost Model: Found costs of 1 for: %V2I32 = fptosi <2 x float> undef to <2 x i32>
; SLM-NEXT: Cost Model: Found costs of 1 for: %V4I32 = fptosi <4 x float> undef to <4 x i32>
; SLM-NEXT: Cost Model: Found costs of 2 for: %V8I32 = fptosi <8 x float> undef to <8 x i32>
; SLM-NEXT: Cost Model: Found costs of 4 for: %V16I32 = fptosi <16 x float> undef to <16 x i32>
; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
%I32 = fptosi float undef to i32
%V2I32 = fptosi <2 x float> undef to <2 x i32>
%V4I32 = fptosi <4 x float> undef to <4 x i32>
%V8I32 = fptosi <8 x float> undef to <8 x i32>
%V16I32 = fptosi <16 x float> undef to <16 x i32>
ret i32 undef
}
define i32 @fptosi_float_i16(i32 %arg) {
; SSE2-LABEL: 'fptosi_float_i16'
; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:1 SizeLat:1 for: %I16 = fptosi float undef to i16
; SSE2-NEXT: Cost Model: Found costs of RThru:5 CodeSize:1 Lat:1 SizeLat:1 for: %V2I16 = fptosi <2 x float> undef to <2 x i16>
; SSE2-NEXT: Cost Model: Found costs of RThru:5 CodeSize:1 Lat:1 SizeLat:1 for: %V4I16 = fptosi <4 x float> undef to <4 x i16>
; SSE2-NEXT: Cost Model: Found costs of RThru:10 CodeSize:2 Lat:2 SizeLat:2 for: %V8I16 = fptosi <8 x float> undef to <8 x i16>
; SSE2-NEXT: Cost Model: Found costs of RThru:20 CodeSize:4 Lat:4 SizeLat:4 for: %V16I16 = fptosi <16 x float> undef to <16 x i16>
; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SSE42-LABEL: 'fptosi_float_i16'
; SSE42-NEXT: Cost Model: Found costs of 1 for: %I16 = fptosi float undef to i16
; SSE42-NEXT: Cost Model: Found costs of 1 for: %V2I16 = fptosi <2 x float> undef to <2 x i16>
; SSE42-NEXT: Cost Model: Found costs of 1 for: %V4I16 = fptosi <4 x float> undef to <4 x i16>
; SSE42-NEXT: Cost Model: Found costs of 2 for: %V8I16 = fptosi <8 x float> undef to <8 x i16>
; SSE42-NEXT: Cost Model: Found costs of 4 for: %V16I16 = fptosi <16 x float> undef to <16 x i16>
; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX1-LABEL: 'fptosi_float_i16'
; AVX1-NEXT: Cost Model: Found costs of 1 for: %I16 = fptosi float undef to i16
; AVX1-NEXT: Cost Model: Found costs of 1 for: %V2I16 = fptosi <2 x float> undef to <2 x i16>
; AVX1-NEXT: Cost Model: Found costs of 1 for: %V4I16 = fptosi <4 x float> undef to <4 x i16>
; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V8I16 = fptosi <8 x float> undef to <8 x i16>
; AVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:2 SizeLat:2 for: %V16I16 = fptosi <16 x float> undef to <16 x i16>
; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX2-LABEL: 'fptosi_float_i16'
; AVX2-NEXT: Cost Model: Found costs of 1 for: %I16 = fptosi float undef to i16
; AVX2-NEXT: Cost Model: Found costs of 1 for: %V2I16 = fptosi <2 x float> undef to <2 x i16>
; AVX2-NEXT: Cost Model: Found costs of 1 for: %V4I16 = fptosi <4 x float> undef to <4 x i16>
; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V8I16 = fptosi <8 x float> undef to <8 x i16>
; AVX2-NEXT: Cost Model: Found costs of 2 for: %V16I16 = fptosi <16 x float> undef to <16 x i16>
; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX512-LABEL: 'fptosi_float_i16'
; AVX512-NEXT: Cost Model: Found costs of 1 for: %I16 = fptosi float undef to i16
; AVX512-NEXT: Cost Model: Found costs of 1 for: %V2I16 = fptosi <2 x float> undef to <2 x i16>
; AVX512-NEXT: Cost Model: Found costs of 1 for: %V4I16 = fptosi <4 x float> undef to <4 x i16>
; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V8I16 = fptosi <8 x float> undef to <8 x i16>
; AVX512-NEXT: Cost Model: Found costs of RThru:3 CodeSize:2 Lat:2 SizeLat:2 for: %V16I16 = fptosi <16 x float> undef to <16 x i16>
; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SLM-LABEL: 'fptosi_float_i16'
; SLM-NEXT: Cost Model: Found costs of 1 for: %I16 = fptosi float undef to i16
; SLM-NEXT: Cost Model: Found costs of 1 for: %V2I16 = fptosi <2 x float> undef to <2 x i16>
; SLM-NEXT: Cost Model: Found costs of 1 for: %V4I16 = fptosi <4 x float> undef to <4 x i16>
; SLM-NEXT: Cost Model: Found costs of 2 for: %V8I16 = fptosi <8 x float> undef to <8 x i16>
; SLM-NEXT: Cost Model: Found costs of 4 for: %V16I16 = fptosi <16 x float> undef to <16 x i16>
; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
%I16 = fptosi float undef to i16
%V2I16 = fptosi <2 x float> undef to <2 x i16>
%V4I16 = fptosi <4 x float> undef to <4 x i16>
%V8I16 = fptosi <8 x float> undef to <8 x i16>
%V16I16 = fptosi <16 x float> undef to <16 x i16>
ret i32 undef
}
define i32 @fptosi_float_i8(i32 %arg) {
; SSE2-LABEL: 'fptosi_float_i8'
; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:1 SizeLat:1 for: %I8 = fptosi float undef to i8
; SSE2-NEXT: Cost Model: Found costs of RThru:6 CodeSize:1 Lat:1 SizeLat:1 for: %V2I8 = fptosi <2 x float> undef to <2 x i8>
; SSE2-NEXT: Cost Model: Found costs of RThru:6 CodeSize:1 Lat:1 SizeLat:1 for: %V4I8 = fptosi <4 x float> undef to <4 x i8>
; SSE2-NEXT: Cost Model: Found costs of RThru:12 CodeSize:2 Lat:2 SizeLat:2 for: %V8I8 = fptosi <8 x float> undef to <8 x i8>
; SSE2-NEXT: Cost Model: Found costs of RThru:24 CodeSize:4 Lat:4 SizeLat:4 for: %V16I8 = fptosi <16 x float> undef to <16 x i8>
; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SSE42-LABEL: 'fptosi_float_i8'
; SSE42-NEXT: Cost Model: Found costs of 1 for: %I8 = fptosi float undef to i8
; SSE42-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V2I8 = fptosi <2 x float> undef to <2 x i8>
; SSE42-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V4I8 = fptosi <4 x float> undef to <4 x i8>
; SSE42-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:2 SizeLat:2 for: %V8I8 = fptosi <8 x float> undef to <8 x i8>
; SSE42-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:4 SizeLat:4 for: %V16I8 = fptosi <16 x float> undef to <16 x i8>
; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX-LABEL: 'fptosi_float_i8'
; AVX-NEXT: Cost Model: Found costs of 1 for: %I8 = fptosi float undef to i8
; AVX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V2I8 = fptosi <2 x float> undef to <2 x i8>
; AVX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V4I8 = fptosi <4 x float> undef to <4 x i8>
; AVX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V8I8 = fptosi <8 x float> undef to <8 x i8>
; AVX-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:2 SizeLat:2 for: %V16I8 = fptosi <16 x float> undef to <16 x i8>
; AVX-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; AVX512-LABEL: 'fptosi_float_i8'
; AVX512-NEXT: Cost Model: Found costs of 1 for: %I8 = fptosi float undef to i8
; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V2I8 = fptosi <2 x float> undef to <2 x i8>
; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V4I8 = fptosi <4 x float> undef to <4 x i8>
; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V8I8 = fptosi <8 x float> undef to <8 x i8>
; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V16I8 = fptosi <16 x float> undef to <16 x i8>
; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
; SLM-LABEL: 'fptosi_float_i8'
; SLM-NEXT: Cost Model: Found costs of 1 for: %I8 = fptosi float undef to i8
; SLM-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V2I8 = fptosi <2 x float> undef to <2 x i8>
; SLM-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %V4I8 = fptosi <4 x float> undef to <4 x i8>
; SLM-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:2 SizeLat:2 for: %V8I8 = fptosi <8 x float> undef to <8 x i8>
; SLM-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:4 SizeLat:4 for: %V16I8 = fptosi <16 x float> undef to <16 x i8>
; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
;
%I8 = fptosi float undef to i8
%V2I8 = fptosi <2 x float> undef to <2 x i8>
%V4I8 = fptosi <4 x float> undef to <4 x i8>
%V8I8 = fptosi <8 x float> undef to <8 x i8>
%V16I8 = fptosi <16 x float> undef to <16 x i8>
ret i32 undef
}