1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py 2; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+sse2 | FileCheck %s --check-prefixes=SSE2 3; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE42 4; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1 5; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2 6; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F 7; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=AVX512,AVX512DQ 8; 9; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mcpu=slm | FileCheck %s --check-prefixes=SLM 10; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mcpu=goldmont | FileCheck %s --check-prefixes=SSE42 11; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=AVX,AVX1 12 13define i32 @fptosi_double_i64(i32 %arg) { 14; SSE2-LABEL: 'fptosi_double_i64' 15; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptosi double undef to i64 16; SSE2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V2I64 = fptosi <2 x double> undef to <2 x i64> 17; SSE2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> 18; SSE2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V8I64 = fptosi <8 x double> undef to <8 x i64> 19; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 20; 21; SSE42-LABEL: 'fptosi_double_i64' 22; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi double undef to i64 23; SSE42-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x double> undef to <2 x i64> 24; SSE42-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> 25; SSE42-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8I64 = fptosi <8 x double> undef to <8 x i64> 26; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 27; 28; AVX-LABEL: 'fptosi_double_i64' 29; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi double undef to i64 30; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x double> undef to <2 x i64> 31; AVX-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> 32; AVX-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V8I64 = fptosi <8 x double> undef to <8 x i64> 33; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 34; 35; AVX512F-LABEL: 'fptosi_double_i64' 36; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi double undef to i64 37; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x double> undef to <2 x i64> 38; AVX512F-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> 39; AVX512F-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V8I64 = fptosi <8 x double> undef to <8 x i64> 40; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 41; 42; AVX512DQ-LABEL: 'fptosi_double_i64' 43; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi double undef to i64 44; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = fptosi <2 x double> undef to <2 x i64> 45; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> 46; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = fptosi <8 x double> undef to <8 x i64> 47; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 48; 49; SLM-LABEL: 'fptosi_double_i64' 50; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi double undef to i64 51; SLM-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V2I64 = fptosi <2 x double> undef to <2 x i64> 52; SLM-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> 53; SLM-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V8I64 = fptosi <8 x double> undef to <8 x i64> 54; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 55; 56 %I64 = fptosi double undef to i64 57 %V2I64 = fptosi <2 x double> undef to <2 x i64> 58 %V4I64 = fptosi <4 x double> undef to <4 x i64> 59 %V8I64 = fptosi <8 x double> undef to <8 x i64> 60 ret i32 undef 61} 62 63define i32 @fptosi_double_i32(i32 %arg) { 64; SSE2-LABEL: 'fptosi_double_i32' 65; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = fptosi double undef to i32 66; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I32 = fptosi <2 x double> undef to <2 x i32> 67; SSE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I32 = fptosi <4 x double> undef to <4 x i32> 68; SSE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I32 = fptosi <8 x double> undef to <8 x i32> 69; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 70; 71; SSE42-LABEL: 'fptosi_double_i32' 72; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi double undef to i32 73; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x double> undef to <2 x i32> 74; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I32 = fptosi <4 x double> undef to <4 x i32> 75; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I32 = fptosi <8 x double> undef to <8 x i32> 76; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 77; 78; AVX1-LABEL: 'fptosi_double_i32' 79; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi double undef to i32 80; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x double> undef to <2 x i32> 81; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I32 = fptosi <4 x double> undef to <4 x i32> 82; AVX1-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V8I32 = fptosi <8 x double> undef to <8 x i32> 83; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 84; 85; AVX2-LABEL: 'fptosi_double_i32' 86; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi double undef to i32 87; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x double> undef to <2 x i32> 88; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x double> undef to <4 x i32> 89; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I32 = fptosi <8 x double> undef to <8 x i32> 90; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 91; 92; AVX512-LABEL: 'fptosi_double_i32' 93; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi double undef to i32 94; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x double> undef to <2 x i32> 95; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x double> undef to <4 x i32> 96; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptosi <8 x double> undef to <8 x i32> 97; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 98; 99; SLM-LABEL: 'fptosi_double_i32' 100; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi double undef to i32 101; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x double> undef to <2 x i32> 102; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I32 = fptosi <4 x double> undef to <4 x i32> 103; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I32 = fptosi <8 x double> undef to <8 x i32> 104; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 105; 106 %I32 = fptosi double undef to i32 107 %V2I32 = fptosi <2 x double> undef to <2 x i32> 108 %V4I32 = fptosi <4 x double> undef to <4 x i32> 109 %V8I32 = fptosi <8 x double> undef to <8 x i32> 110 ret i32 undef 111} 112 113define i32 @fptosi_double_i16(i32 %arg) { 114; SSE2-LABEL: 'fptosi_double_i16' 115; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = fptosi double undef to i16 116; SSE2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V2I16 = fptosi <2 x double> undef to <2 x i16> 117; SSE2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V4I16 = fptosi <4 x double> undef to <4 x i16> 118; SSE2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V8I16 = fptosi <8 x double> undef to <8 x i16> 119; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 120; 121; SSE42-LABEL: 'fptosi_double_i16' 122; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi double undef to i16 123; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptosi <2 x double> undef to <2 x i16> 124; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptosi <4 x double> undef to <4 x i16> 125; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I16 = fptosi <8 x double> undef to <8 x i16> 126; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 127; 128; AVX-LABEL: 'fptosi_double_i16' 129; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi double undef to i16 130; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptosi <2 x double> undef to <2 x i16> 131; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptosi <4 x double> undef to <4 x i16> 132; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I16 = fptosi <8 x double> undef to <8 x i16> 133; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 134; 135; AVX512-LABEL: 'fptosi_double_i16' 136; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi double undef to i16 137; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptosi <2 x double> undef to <2 x i16> 138; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptosi <4 x double> undef to <4 x i16> 139; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I16 = fptosi <8 x double> undef to <8 x i16> 140; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 141; 142; SLM-LABEL: 'fptosi_double_i16' 143; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi double undef to i16 144; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptosi <2 x double> undef to <2 x i16> 145; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptosi <4 x double> undef to <4 x i16> 146; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I16 = fptosi <8 x double> undef to <8 x i16> 147; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 148; 149 %I16 = fptosi double undef to i16 150 %V2I16 = fptosi <2 x double> undef to <2 x i16> 151 %V4I16 = fptosi <4 x double> undef to <4 x i16> 152 %V8I16 = fptosi <8 x double> undef to <8 x i16> 153 ret i32 undef 154} 155 156define i32 @fptosi_double_i8(i32 %arg) { 157; SSE2-LABEL: 'fptosi_double_i8' 158; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = fptosi double undef to i8 159; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> 160; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> 161; SSE2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> 162; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 163; 164; SSE42-LABEL: 'fptosi_double_i8' 165; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 166; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> 167; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> 168; SSE42-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> 169; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 170; 171; AVX-LABEL: 'fptosi_double_i8' 172; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 173; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> 174; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> 175; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> 176; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 177; 178; AVX512-LABEL: 'fptosi_double_i8' 179; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 180; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> 181; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> 182; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> 183; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 184; 185; SLM-LABEL: 'fptosi_double_i8' 186; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 187; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> 188; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> 189; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> 190; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 191; 192 %I8 = fptosi double undef to i8 193 %V2I8 = fptosi <2 x double> undef to <2 x i8> 194 %V4I8 = fptosi <4 x double> undef to <4 x i8> 195 %V8I8 = fptosi <8 x double> undef to <8 x i8> 196 ret i32 undef 197} 198 199define i32 @fptosi_float_i64(i32 %arg) { 200; SSE2-LABEL: 'fptosi_float_i64' 201; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptosi float undef to i64 202; SSE2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> 203; SSE2-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> 204; SSE2-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> 205; SSE2-NEXT: Cost Model: Found an estimated cost of 116 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> 206; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 207; 208; SSE42-LABEL: 'fptosi_float_i64' 209; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 210; SSE42-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> 211; SSE42-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> 212; SSE42-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> 213; SSE42-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> 214; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 215; 216; AVX-LABEL: 'fptosi_float_i64' 217; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 218; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> 219; AVX-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> 220; AVX-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> 221; AVX-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> 222; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 223; 224; AVX512F-LABEL: 'fptosi_float_i64' 225; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 226; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> 227; AVX512F-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> 228; AVX512F-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> 229; AVX512F-NEXT: Cost Model: Found an estimated cost of 61 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> 230; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 231; 232; AVX512DQ-LABEL: 'fptosi_float_i64' 233; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 234; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> 235; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> 236; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> 237; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> 238; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 239; 240; SLM-LABEL: 'fptosi_float_i64' 241; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 242; SLM-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> 243; SLM-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> 244; SLM-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> 245; SLM-NEXT: Cost Model: Found an estimated cost of 100 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> 246; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 247; 248 %I64 = fptosi float undef to i64 249 %V2I64 = fptosi <2 x float> undef to <2 x i64> 250 %V4I64 = fptosi <4 x float> undef to <4 x i64> 251 %V8I64 = fptosi <8 x float> undef to <8 x i64> 252 %V16I64 = fptosi <16 x float> undef to <16 x i64> 253 ret i32 undef 254} 255 256define i32 @fptosi_float_i32(i32 %arg) { 257; SSE2-LABEL: 'fptosi_float_i32' 258; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = fptosi float undef to i32 259; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I32 = fptosi <2 x float> undef to <2 x i32> 260; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4I32 = fptosi <4 x float> undef to <4 x i32> 261; SSE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V8I32 = fptosi <8 x float> undef to <8 x i32> 262; SSE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V16I32 = fptosi <16 x float> undef to <16 x i32> 263; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 264; 265; SSE42-LABEL: 'fptosi_float_i32' 266; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi float undef to i32 267; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x float> undef to <2 x i32> 268; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x float> undef to <4 x i32> 269; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I32 = fptosi <8 x float> undef to <8 x i32> 270; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I32 = fptosi <16 x float> undef to <16 x i32> 271; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 272; 273; AVX1-LABEL: 'fptosi_float_i32' 274; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi float undef to i32 275; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x float> undef to <2 x i32> 276; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x float> undef to <4 x i32> 277; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I32 = fptosi <8 x float> undef to <8 x i32> 278; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I32 = fptosi <16 x float> undef to <16 x i32> 279; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 280; 281; AVX2-LABEL: 'fptosi_float_i32' 282; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi float undef to i32 283; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x float> undef to <2 x i32> 284; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x float> undef to <4 x i32> 285; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptosi <8 x float> undef to <8 x i32> 286; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16I32 = fptosi <16 x float> undef to <16 x i32> 287; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 288; 289; AVX512-LABEL: 'fptosi_float_i32' 290; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi float undef to i32 291; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x float> undef to <2 x i32> 292; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x float> undef to <4 x i32> 293; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptosi <8 x float> undef to <8 x i32> 294; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = fptosi <16 x float> undef to <16 x i32> 295; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 296; 297; SLM-LABEL: 'fptosi_float_i32' 298; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi float undef to i32 299; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x float> undef to <2 x i32> 300; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x float> undef to <4 x i32> 301; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I32 = fptosi <8 x float> undef to <8 x i32> 302; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I32 = fptosi <16 x float> undef to <16 x i32> 303; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 304; 305 %I32 = fptosi float undef to i32 306 %V2I32 = fptosi <2 x float> undef to <2 x i32> 307 %V4I32 = fptosi <4 x float> undef to <4 x i32> 308 %V8I32 = fptosi <8 x float> undef to <8 x i32> 309 %V16I32 = fptosi <16 x float> undef to <16 x i32> 310 ret i32 undef 311} 312 313define i32 @fptosi_float_i16(i32 %arg) { 314; SSE2-LABEL: 'fptosi_float_i16' 315; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = fptosi float undef to i16 316; SSE2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V2I16 = fptosi <2 x float> undef to <2 x i16> 317; SSE2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V4I16 = fptosi <4 x float> undef to <4 x i16> 318; SSE2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V8I16 = fptosi <8 x float> undef to <8 x i16> 319; SSE2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V16I16 = fptosi <16 x float> undef to <16 x i16> 320; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 321; 322; SSE42-LABEL: 'fptosi_float_i16' 323; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi float undef to i16 324; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptosi <2 x float> undef to <2 x i16> 325; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptosi <4 x float> undef to <4 x i16> 326; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I16 = fptosi <8 x float> undef to <8 x i16> 327; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I16 = fptosi <16 x float> undef to <16 x i16> 328; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 329; 330; AVX1-LABEL: 'fptosi_float_i16' 331; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi float undef to i16 332; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptosi <2 x float> undef to <2 x i16> 333; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptosi <4 x float> undef to <4 x i16> 334; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I16 = fptosi <8 x float> undef to <8 x i16> 335; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I16 = fptosi <16 x float> undef to <16 x i16> 336; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 337; 338; AVX2-LABEL: 'fptosi_float_i16' 339; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi float undef to i16 340; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptosi <2 x float> undef to <2 x i16> 341; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptosi <4 x float> undef to <4 x i16> 342; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I16 = fptosi <8 x float> undef to <8 x i16> 343; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16I16 = fptosi <16 x float> undef to <16 x i16> 344; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 345; 346; AVX512-LABEL: 'fptosi_float_i16' 347; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi float undef to i16 348; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptosi <2 x float> undef to <2 x i16> 349; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptosi <4 x float> undef to <4 x i16> 350; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I16 = fptosi <8 x float> undef to <8 x i16> 351; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I16 = fptosi <16 x float> undef to <16 x i16> 352; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 353; 354; SLM-LABEL: 'fptosi_float_i16' 355; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi float undef to i16 356; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptosi <2 x float> undef to <2 x i16> 357; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptosi <4 x float> undef to <4 x i16> 358; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I16 = fptosi <8 x float> undef to <8 x i16> 359; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I16 = fptosi <16 x float> undef to <16 x i16> 360; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 361; 362 %I16 = fptosi float undef to i16 363 %V2I16 = fptosi <2 x float> undef to <2 x i16> 364 %V4I16 = fptosi <4 x float> undef to <4 x i16> 365 %V8I16 = fptosi <8 x float> undef to <8 x i16> 366 %V16I16 = fptosi <16 x float> undef to <16 x i16> 367 ret i32 undef 368} 369 370define i32 @fptosi_float_i8(i32 %arg) { 371; SSE2-LABEL: 'fptosi_float_i8' 372; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = fptosi float undef to i8 373; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I8 = fptosi <2 x float> undef to <2 x i8> 374; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> 375; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> 376; SSE2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> 377; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 378; 379; SSE42-LABEL: 'fptosi_float_i8' 380; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi float undef to i8 381; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptosi <2 x float> undef to <2 x i8> 382; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> 383; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> 384; SSE42-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> 385; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 386; 387; AVX-LABEL: 'fptosi_float_i8' 388; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi float undef to i8 389; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptosi <2 x float> undef to <2 x i8> 390; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> 391; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> 392; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> 393; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 394; 395; AVX512-LABEL: 'fptosi_float_i8' 396; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi float undef to i8 397; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptosi <2 x float> undef to <2 x i8> 398; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> 399; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> 400; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> 401; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 402; 403; SLM-LABEL: 'fptosi_float_i8' 404; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi float undef to i8 405; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptosi <2 x float> undef to <2 x i8> 406; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> 407; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> 408; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> 409; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 410; 411 %I8 = fptosi float undef to i8 412 %V2I8 = fptosi <2 x float> undef to <2 x i8> 413 %V4I8 = fptosi <4 x float> undef to <4 x i8> 414 %V8I8 = fptosi <8 x float> undef to <8 x i8> 415 %V16I8 = fptosi <16 x float> undef to <16 x i8> 416 ret i32 undef 417} 418