1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py 2; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+sse2 | FileCheck %s --check-prefixes=SSE,SSE2 3; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE,SSE42 4; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx | FileCheck %s --check-prefixes=AVX 5; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx2 | FileCheck %s --check-prefixes=AVX 6; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F 7; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=AVX512,AVX512DQ 8; 9; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mcpu=slm | FileCheck %s --check-prefixes=SSE,SLM 10; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mcpu=goldmont | FileCheck %s --check-prefixes=SSE,SSE42 11; RUN: opt < %s -mtriple=x86_64-apple-darwin -cost-model -analyze -mcpu=btver2 | FileCheck %s --check-prefixes=AVX 12 13define i32 @fptosi_double_i64(i32 %arg) { 14; SSE2-LABEL: 'fptosi_double_i64' 15; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi double undef to i64 16; SSE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2I64 = fptosi <2 x double> undef to <2 x i64> 17; SSE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> 18; SSE2-NEXT: Cost Model: Found an estimated cost of 32 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 16 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> 32; AVX-NEXT: Cost Model: Found an estimated cost of 32 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 16 for instruction: %V4I64 = fptosi <4 x double> undef to <4 x i64> 39; AVX512F-NEXT: Cost Model: Found an estimated cost of 34 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; SSE-LABEL: 'fptosi_double_i32' 65; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi double undef to i32 66; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x double> undef to <2 x i32> 67; SSE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4I32 = fptosi <4 x double> undef to <4 x i32> 68; SSE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V8I32 = fptosi <8 x double> undef to <8 x i32> 69; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 70; 71; AVX-LABEL: 'fptosi_double_i32' 72; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi double undef to i32 73; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x double> undef to <2 x i32> 74; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x double> undef to <4 x i32> 75; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I32 = fptosi <8 x double> undef to <8 x i32> 76; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 77; 78; AVX512-LABEL: 'fptosi_double_i32' 79; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi double undef to i32 80; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x double> undef to <2 x i32> 81; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x double> undef to <4 x i32> 82; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptosi <8 x double> undef to <8 x i32> 83; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 84; 85 %I32 = fptosi double undef to i32 86 %V2I32 = fptosi <2 x double> undef to <2 x i32> 87 %V4I32 = fptosi <4 x double> undef to <4 x i32> 88 %V8I32 = fptosi <8 x double> undef to <8 x i32> 89 ret i32 undef 90} 91 92define i32 @fptosi_double_i16(i32 %arg) { 93; SSE-LABEL: 'fptosi_double_i16' 94; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi double undef to i16 95; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I16 = fptosi <2 x double> undef to <2 x i16> 96; SSE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V4I16 = fptosi <4 x double> undef to <4 x i16> 97; SSE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %V8I16 = fptosi <8 x double> undef to <8 x i16> 98; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 99; 100; AVX-LABEL: 'fptosi_double_i16' 101; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi double undef to i16 102; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I16 = fptosi <2 x double> undef to <2 x i16> 103; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptosi <4 x double> undef to <4 x i16> 104; AVX-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V8I16 = fptosi <8 x double> undef to <8 x i16> 105; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 106; 107; AVX512-LABEL: 'fptosi_double_i16' 108; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi double undef to i16 109; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I16 = fptosi <2 x double> undef to <2 x i16> 110; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptosi <4 x double> undef to <4 x i16> 111; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I16 = fptosi <8 x double> undef to <8 x i16> 112; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 113; 114 %I16 = fptosi double undef to i16 115 %V2I16 = fptosi <2 x double> undef to <2 x i16> 116 %V4I16 = fptosi <4 x double> undef to <4 x i16> 117 %V8I16 = fptosi <8 x double> undef to <8 x i16> 118 ret i32 undef 119} 120 121define i32 @fptosi_double_i8(i32 %arg) { 122; SSE2-LABEL: 'fptosi_double_i8' 123; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 124; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> 125; SSE2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> 126; SSE2-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> 127; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 128; 129; SSE42-LABEL: 'fptosi_double_i8' 130; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 131; SSE42-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> 132; SSE42-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> 133; SSE42-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> 134; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 135; 136; AVX-LABEL: 'fptosi_double_i8' 137; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 138; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> 139; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> 140; AVX-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> 141; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 142; 143; AVX512-LABEL: 'fptosi_double_i8' 144; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 145; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> 146; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> 147; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> 148; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 149; 150; SLM-LABEL: 'fptosi_double_i8' 151; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi double undef to i8 152; SLM-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I8 = fptosi <2 x double> undef to <2 x i8> 153; SLM-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V4I8 = fptosi <4 x double> undef to <4 x i8> 154; SLM-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V8I8 = fptosi <8 x double> undef to <8 x i8> 155; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 156; 157 %I8 = fptosi double undef to i8 158 %V2I8 = fptosi <2 x double> undef to <2 x i8> 159 %V4I8 = fptosi <4 x double> undef to <4 x i8> 160 %V8I8 = fptosi <8 x double> undef to <8 x i8> 161 ret i32 undef 162} 163 164define i32 @fptosi_float_i64(i32 %arg) { 165; SSE2-LABEL: 'fptosi_float_i64' 166; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 167; SSE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> 168; SSE2-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> 169; SSE2-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> 170; SSE2-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> 171; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 172; 173; SSE42-LABEL: 'fptosi_float_i64' 174; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 175; SSE42-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> 176; SSE42-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> 177; SSE42-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> 178; SSE42-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> 179; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 180; 181; AVX-LABEL: 'fptosi_float_i64' 182; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 183; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> 184; AVX-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> 185; AVX-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> 186; AVX-NEXT: Cost Model: Found an estimated cost of 66 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> 187; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 188; 189; AVX512F-LABEL: 'fptosi_float_i64' 190; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 191; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> 192; AVX512F-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> 193; AVX512F-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> 194; AVX512F-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> 195; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 196; 197; AVX512DQ-LABEL: 'fptosi_float_i64' 198; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 199; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> 200; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> 201; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> 202; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> 203; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 204; 205; SLM-LABEL: 'fptosi_float_i64' 206; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptosi float undef to i64 207; SLM-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V2I64 = fptosi <2 x float> undef to <2 x i64> 208; SLM-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V4I64 = fptosi <4 x float> undef to <4 x i64> 209; SLM-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %V8I64 = fptosi <8 x float> undef to <8 x i64> 210; SLM-NEXT: Cost Model: Found an estimated cost of 100 for instruction: %V16I64 = fptosi <16 x float> undef to <16 x i64> 211; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 212; 213 %I64 = fptosi float undef to i64 214 %V2I64 = fptosi <2 x float> undef to <2 x i64> 215 %V4I64 = fptosi <4 x float> undef to <4 x i64> 216 %V8I64 = fptosi <8 x float> undef to <8 x i64> 217 %V16I64 = fptosi <16 x float> undef to <16 x i64> 218 ret i32 undef 219} 220 221define i32 @fptosi_float_i32(i32 %arg) { 222; SSE-LABEL: 'fptosi_float_i32' 223; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi float undef to i32 224; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x float> undef to <2 x i32> 225; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x float> undef to <4 x i32> 226; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I32 = fptosi <8 x float> undef to <8 x i32> 227; SSE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I32 = fptosi <16 x float> undef to <16 x i32> 228; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 229; 230; AVX-LABEL: 'fptosi_float_i32' 231; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi float undef to i32 232; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x float> undef to <2 x i32> 233; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x float> undef to <4 x i32> 234; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptosi <8 x float> undef to <8 x i32> 235; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16I32 = fptosi <16 x float> undef to <16 x i32> 236; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 237; 238; AVX512-LABEL: 'fptosi_float_i32' 239; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptosi float undef to i32 240; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptosi <2 x float> undef to <2 x i32> 241; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptosi <4 x float> undef to <4 x i32> 242; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptosi <8 x float> undef to <8 x i32> 243; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = fptosi <16 x float> undef to <16 x i32> 244; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 245; 246 %I32 = fptosi float undef to i32 247 %V2I32 = fptosi <2 x float> undef to <2 x i32> 248 %V4I32 = fptosi <4 x float> undef to <4 x i32> 249 %V8I32 = fptosi <8 x float> undef to <8 x i32> 250 %V16I32 = fptosi <16 x float> undef to <16 x i32> 251 ret i32 undef 252} 253 254define i32 @fptosi_float_i16(i32 %arg) { 255; SSE-LABEL: 'fptosi_float_i16' 256; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi float undef to i16 257; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I16 = fptosi <2 x float> undef to <2 x i16> 258; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptosi <4 x float> undef to <4 x i16> 259; SSE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V8I16 = fptosi <8 x float> undef to <8 x i16> 260; SSE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V16I16 = fptosi <16 x float> undef to <16 x i16> 261; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 262; 263; AVX-LABEL: 'fptosi_float_i16' 264; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi float undef to i16 265; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I16 = fptosi <2 x float> undef to <2 x i16> 266; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptosi <4 x float> undef to <4 x i16> 267; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I16 = fptosi <8 x float> undef to <8 x i16> 268; AVX-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V16I16 = fptosi <16 x float> undef to <16 x i16> 269; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 270; 271; AVX512-LABEL: 'fptosi_float_i16' 272; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptosi float undef to i16 273; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I16 = fptosi <2 x float> undef to <2 x i16> 274; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptosi <4 x float> undef to <4 x i16> 275; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I16 = fptosi <8 x float> undef to <8 x i16> 276; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I16 = fptosi <16 x float> undef to <16 x i16> 277; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 278; 279 %I16 = fptosi float undef to i16 280 %V2I16 = fptosi <2 x float> undef to <2 x i16> 281 %V4I16 = fptosi <4 x float> undef to <4 x i16> 282 %V8I16 = fptosi <8 x float> undef to <8 x i16> 283 %V16I16 = fptosi <16 x float> undef to <16 x i16> 284 ret i32 undef 285} 286 287define i32 @fptosi_float_i8(i32 %arg) { 288; SSE2-LABEL: 'fptosi_float_i8' 289; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi float undef to i8 290; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I8 = fptosi <2 x float> undef to <2 x i8> 291; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> 292; SSE2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> 293; SSE2-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> 294; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 295; 296; SSE42-LABEL: 'fptosi_float_i8' 297; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi float undef to i8 298; SSE42-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I8 = fptosi <2 x float> undef to <2 x i8> 299; SSE42-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> 300; SSE42-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> 301; SSE42-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> 302; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 303; 304; AVX-LABEL: 'fptosi_float_i8' 305; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi float undef to i8 306; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I8 = fptosi <2 x float> undef to <2 x i8> 307; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> 308; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> 309; AVX-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> 310; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 311; 312; AVX512-LABEL: 'fptosi_float_i8' 313; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi float undef to i8 314; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I8 = fptosi <2 x float> undef to <2 x i8> 315; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> 316; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> 317; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> 318; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 319; 320; SLM-LABEL: 'fptosi_float_i8' 321; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptosi float undef to i8 322; SLM-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I8 = fptosi <2 x float> undef to <2 x i8> 323; SLM-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4I8 = fptosi <4 x float> undef to <4 x i8> 324; SLM-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V8I8 = fptosi <8 x float> undef to <8 x i8> 325; SLM-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V16I8 = fptosi <16 x float> undef to <16 x i8> 326; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 327; 328 %I8 = fptosi float undef to i8 329 %V2I8 = fptosi <2 x float> undef to <2 x i8> 330 %V4I8 = fptosi <4 x float> undef to <4 x i8> 331 %V8I8 = fptosi <8 x float> undef to <8 x i8> 332 %V16I8 = fptosi <16 x float> undef to <16 x i8> 333 ret i32 undef 334} 335