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