Andrew Walbran | 3d2c197 | 2020-04-07 12:24:26 +0100 | [diff] [blame] | 1 | //===-- VecFuncs.def - Library information -------------*- C++ -*-----------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // This .def file will create mappings from scalar math functions to vector |
| 10 | // functions along with their vectorization factor. The current support includes |
Olivier Deprez | f4ef2d0 | 2021-04-20 13:36:24 +0200 | [diff] [blame] | 11 | // such mappings for Accelerate framework, MASS vector library, and SVML library. |
| 12 | // This .def file also allows creating an array of vector functions supported in |
| 13 | // the specified framework or library. |
| 14 | |
| 15 | #if defined(TLI_DEFINE_MASSV_VECFUNCS_NAMES) |
| 16 | #define TLI_DEFINE_MASSV_VECFUNCS |
| 17 | #define TLI_DEFINE_VECFUNC(SCAL, VEC, VF) VEC, |
| 18 | #endif |
Andrew Walbran | 3d2c197 | 2020-04-07 12:24:26 +0100 | [diff] [blame] | 19 | |
| 20 | #if !(defined(TLI_DEFINE_VECFUNC)) |
| 21 | #define TLI_DEFINE_VECFUNC(SCAL, VEC, VF) {SCAL, VEC, VF}, |
| 22 | #endif |
| 23 | |
| 24 | #if defined(TLI_DEFINE_ACCELERATE_VECFUNCS) |
| 25 | // Accelerate framework's Vector Functions |
| 26 | |
| 27 | // Floating-Point Arithmetic and Auxiliary Functions |
| 28 | TLI_DEFINE_VECFUNC("ceilf", "vceilf", 4) |
| 29 | TLI_DEFINE_VECFUNC("fabsf", "vfabsf", 4) |
| 30 | TLI_DEFINE_VECFUNC("llvm.fabs.f32", "vfabsf", 4) |
| 31 | TLI_DEFINE_VECFUNC("floorf", "vfloorf", 4) |
| 32 | TLI_DEFINE_VECFUNC("sqrtf", "vsqrtf", 4) |
| 33 | TLI_DEFINE_VECFUNC("llvm.sqrt.f32", "vsqrtf", 4) |
| 34 | |
| 35 | // Exponential and Logarithmic Functions |
| 36 | TLI_DEFINE_VECFUNC("expf", "vexpf", 4) |
| 37 | TLI_DEFINE_VECFUNC("llvm.exp.f32", "vexpf", 4) |
| 38 | TLI_DEFINE_VECFUNC("expm1f", "vexpm1f", 4) |
| 39 | TLI_DEFINE_VECFUNC("logf", "vlogf", 4) |
| 40 | TLI_DEFINE_VECFUNC("llvm.log.f32", "vlogf", 4) |
| 41 | TLI_DEFINE_VECFUNC("log1pf", "vlog1pf", 4) |
| 42 | TLI_DEFINE_VECFUNC("log10f", "vlog10f", 4) |
| 43 | TLI_DEFINE_VECFUNC("llvm.log10.f32", "vlog10f", 4) |
| 44 | TLI_DEFINE_VECFUNC("logbf", "vlogbf", 4) |
| 45 | |
| 46 | // Trigonometric Functions |
| 47 | TLI_DEFINE_VECFUNC("sinf", "vsinf", 4) |
| 48 | TLI_DEFINE_VECFUNC("llvm.sin.f32", "vsinf", 4) |
| 49 | TLI_DEFINE_VECFUNC("cosf", "vcosf", 4) |
| 50 | TLI_DEFINE_VECFUNC("llvm.cos.f32", "vcosf", 4) |
| 51 | TLI_DEFINE_VECFUNC("tanf", "vtanf", 4) |
| 52 | TLI_DEFINE_VECFUNC("asinf", "vasinf", 4) |
| 53 | TLI_DEFINE_VECFUNC("acosf", "vacosf", 4) |
| 54 | TLI_DEFINE_VECFUNC("atanf", "vatanf", 4) |
| 55 | |
| 56 | // Hyperbolic Functions |
| 57 | TLI_DEFINE_VECFUNC("sinhf", "vsinhf", 4) |
| 58 | TLI_DEFINE_VECFUNC("coshf", "vcoshf", 4) |
| 59 | TLI_DEFINE_VECFUNC("tanhf", "vtanhf", 4) |
| 60 | TLI_DEFINE_VECFUNC("asinhf", "vasinhf", 4) |
| 61 | TLI_DEFINE_VECFUNC("acoshf", "vacoshf", 4) |
| 62 | TLI_DEFINE_VECFUNC("atanhf", "vatanhf", 4) |
| 63 | |
| 64 | |
Olivier Deprez | f4ef2d0 | 2021-04-20 13:36:24 +0200 | [diff] [blame] | 65 | #elif defined(TLI_DEFINE_LIBMVEC_X86_VECFUNCS) |
| 66 | // GLIBC Vector math Functions |
| 67 | |
| 68 | TLI_DEFINE_VECFUNC("sin", "_ZGVbN2v_sin", 2) |
| 69 | TLI_DEFINE_VECFUNC("sin", "_ZGVdN4v_sin", 4) |
| 70 | |
| 71 | TLI_DEFINE_VECFUNC("sinf", "_ZGVbN4v_sinf", 4) |
| 72 | TLI_DEFINE_VECFUNC("sinf", "_ZGVdN8v_sinf", 8) |
| 73 | |
| 74 | TLI_DEFINE_VECFUNC("llvm.sin.f64", "_ZGVbN2v_sin", 2) |
| 75 | TLI_DEFINE_VECFUNC("llvm.sin.f64", "_ZGVdN4v_sin", 4) |
| 76 | |
| 77 | TLI_DEFINE_VECFUNC("llvm.sin.f32", "_ZGVbN4v_sinf", 4) |
| 78 | TLI_DEFINE_VECFUNC("llvm.sin.f32", "_ZGVdN8v_sinf", 8) |
| 79 | |
| 80 | TLI_DEFINE_VECFUNC("cos", "_ZGVbN2v_cos", 2) |
| 81 | TLI_DEFINE_VECFUNC("cos", "_ZGVdN4v_cos", 4) |
| 82 | |
| 83 | TLI_DEFINE_VECFUNC("cosf", "_ZGVbN4v_cosf", 4) |
| 84 | TLI_DEFINE_VECFUNC("cosf", "_ZGVdN8v_cosf", 8) |
| 85 | |
| 86 | TLI_DEFINE_VECFUNC("llvm.cos.f64", "_ZGVbN2v_cos", 2) |
| 87 | TLI_DEFINE_VECFUNC("llvm.cos.f64", "_ZGVdN4v_cos", 4) |
| 88 | |
| 89 | TLI_DEFINE_VECFUNC("llvm.cos.f32", "_ZGVbN4v_cosf", 4) |
| 90 | TLI_DEFINE_VECFUNC("llvm.cos.f32", "_ZGVdN8v_cosf", 8) |
| 91 | |
| 92 | TLI_DEFINE_VECFUNC("pow", "_ZGVbN2vv_pow", 2) |
| 93 | TLI_DEFINE_VECFUNC("pow", "_ZGVdN4vv_pow", 4) |
| 94 | |
| 95 | TLI_DEFINE_VECFUNC("powf", "_ZGVbN4vv_powf", 4) |
| 96 | TLI_DEFINE_VECFUNC("powf", "_ZGVdN8vv_powf", 8) |
| 97 | |
| 98 | TLI_DEFINE_VECFUNC("__pow_finite", "_ZGVbN2vv___pow_finite", 2) |
| 99 | TLI_DEFINE_VECFUNC("__pow_finite", "_ZGVdN4vv___pow_finite", 4) |
| 100 | |
| 101 | TLI_DEFINE_VECFUNC("__powf_finite", "_ZGVbN4vv___powf_finite", 4) |
| 102 | TLI_DEFINE_VECFUNC("__powf_finite", "_ZGVdN8vv___powf_finite", 8) |
| 103 | |
| 104 | TLI_DEFINE_VECFUNC("llvm.pow.f64", "_ZGVbN2vv_pow", 2) |
| 105 | TLI_DEFINE_VECFUNC("llvm.pow.f64", "_ZGVdN4vv_pow", 4) |
| 106 | |
| 107 | TLI_DEFINE_VECFUNC("llvm.pow.f32", "_ZGVbN4vv_powf", 4) |
| 108 | TLI_DEFINE_VECFUNC("llvm.pow.f32", "_ZGVdN8vv_powf", 8) |
| 109 | |
| 110 | TLI_DEFINE_VECFUNC("exp", "_ZGVbN2v_exp", 2) |
| 111 | TLI_DEFINE_VECFUNC("exp", "_ZGVdN4v_exp", 4) |
| 112 | |
| 113 | TLI_DEFINE_VECFUNC("expf", "_ZGVbN4v_expf", 4) |
| 114 | TLI_DEFINE_VECFUNC("expf", "_ZGVdN8v_expf", 8) |
| 115 | |
| 116 | TLI_DEFINE_VECFUNC("__exp_finite", "_ZGVbN2v___exp_finite", 2) |
| 117 | TLI_DEFINE_VECFUNC("__exp_finite", "_ZGVdN4v___exp_finite", 4) |
| 118 | |
| 119 | TLI_DEFINE_VECFUNC("__expf_finite", "_ZGVbN4v___expf_finite", 4) |
| 120 | TLI_DEFINE_VECFUNC("__expf_finite", "_ZGVdN8v___expf_finite", 8) |
| 121 | |
| 122 | TLI_DEFINE_VECFUNC("llvm.exp.f64", "_ZGVbN2v_exp", 2) |
| 123 | TLI_DEFINE_VECFUNC("llvm.exp.f64", "_ZGVdN4v_exp", 4) |
| 124 | |
| 125 | TLI_DEFINE_VECFUNC("llvm.exp.f32", "_ZGVbN4v_expf", 4) |
| 126 | TLI_DEFINE_VECFUNC("llvm.exp.f32", "_ZGVdN8v_expf", 8) |
| 127 | |
| 128 | TLI_DEFINE_VECFUNC("log", "_ZGVbN2v_log", 2) |
| 129 | TLI_DEFINE_VECFUNC("log", "_ZGVdN4v_log", 4) |
| 130 | |
| 131 | TLI_DEFINE_VECFUNC("logf", "_ZGVbN4v_logf", 4) |
| 132 | TLI_DEFINE_VECFUNC("logf", "_ZGVdN8v_logf", 8) |
| 133 | |
| 134 | TLI_DEFINE_VECFUNC("__log_finite", "_ZGVbN2v___log_finite", 2) |
| 135 | TLI_DEFINE_VECFUNC("__log_finite", "_ZGVdN4v___log_finite", 4) |
| 136 | |
| 137 | TLI_DEFINE_VECFUNC("__logf_finite", "_ZGVbN4v___logf_finite", 4) |
| 138 | TLI_DEFINE_VECFUNC("__logf_finite", "_ZGVdN8v___logf_finite", 8) |
| 139 | |
| 140 | TLI_DEFINE_VECFUNC("llvm.log.f64", "_ZGVbN2v_log", 2) |
| 141 | TLI_DEFINE_VECFUNC("llvm.log.f64", "_ZGVdN4v_log", 4) |
| 142 | |
| 143 | TLI_DEFINE_VECFUNC("llvm.log.f32", "_ZGVbN4v_logf", 4) |
| 144 | TLI_DEFINE_VECFUNC("llvm.log.f32", "_ZGVdN8v_logf", 8) |
| 145 | |
Andrew Walbran | 3d2c197 | 2020-04-07 12:24:26 +0100 | [diff] [blame] | 146 | #elif defined(TLI_DEFINE_MASSV_VECFUNCS) |
| 147 | // IBM MASS library's vector Functions |
| 148 | |
| 149 | // Floating-Point Arithmetic and Auxiliary Functions |
| 150 | TLI_DEFINE_VECFUNC("cbrt", "__cbrtd2_massv", 2) |
| 151 | TLI_DEFINE_VECFUNC("cbrtf", "__cbrtf4_massv", 4) |
| 152 | TLI_DEFINE_VECFUNC("pow", "__powd2_massv", 2) |
| 153 | TLI_DEFINE_VECFUNC("llvm.pow.f64", "__powd2_massv", 2) |
| 154 | TLI_DEFINE_VECFUNC("powf", "__powf4_massv", 4) |
| 155 | TLI_DEFINE_VECFUNC("llvm.pow.f32", "__powf4_massv", 4) |
| 156 | TLI_DEFINE_VECFUNC("sqrt", "__sqrtd2_massv", 2) |
| 157 | TLI_DEFINE_VECFUNC("llvm.sqrt.f64", "__sqrtd2_massv", 2) |
| 158 | TLI_DEFINE_VECFUNC("sqrtf", "__sqrtf4_massv", 4) |
| 159 | TLI_DEFINE_VECFUNC("llvm.sqrt.f32", "__sqrtf4_massv", 4) |
| 160 | |
| 161 | // Exponential and Logarithmic Functions |
| 162 | TLI_DEFINE_VECFUNC("exp", "__expd2_massv", 2) |
| 163 | TLI_DEFINE_VECFUNC("llvm.exp.f64", "__expd2_massv", 2) |
| 164 | TLI_DEFINE_VECFUNC("expf", "__expf4_massv", 4) |
| 165 | TLI_DEFINE_VECFUNC("llvm.exp.f32", "__expf4_massv", 4) |
| 166 | TLI_DEFINE_VECFUNC("exp2", "__exp2d2_massv", 2) |
| 167 | TLI_DEFINE_VECFUNC("llvm.exp2.f64", "__exp2d2_massv", 2) |
| 168 | TLI_DEFINE_VECFUNC("exp2f", "__exp2f4_massv", 4) |
| 169 | TLI_DEFINE_VECFUNC("llvm.exp2.f32", "__exp2f4_massv", 4) |
| 170 | TLI_DEFINE_VECFUNC("expm1", "__expm1d2_massv", 2) |
| 171 | TLI_DEFINE_VECFUNC("expm1f", "__expm1f4_massv", 4) |
| 172 | TLI_DEFINE_VECFUNC("log", "__logd2_massv", 2) |
| 173 | TLI_DEFINE_VECFUNC("llvm.log.f64", "__logd2_massv", 2) |
| 174 | TLI_DEFINE_VECFUNC("logf", "__logf4_massv", 4) |
| 175 | TLI_DEFINE_VECFUNC("llvm.log.f32", "__logf4_massv", 4) |
| 176 | TLI_DEFINE_VECFUNC("log1p", "__log1pd2_massv", 2) |
| 177 | TLI_DEFINE_VECFUNC("log1pf", "__log1pf4_massv", 4) |
| 178 | TLI_DEFINE_VECFUNC("log10", "__log10d2_massv", 2) |
| 179 | TLI_DEFINE_VECFUNC("llvm.log10.f64", "__log10d2_massv", 2) |
| 180 | TLI_DEFINE_VECFUNC("log10f", "__log10f4_massv", 4) |
| 181 | TLI_DEFINE_VECFUNC("llvm.log10.f32", "__log10f4_massv", 4) |
| 182 | TLI_DEFINE_VECFUNC("log2", "__log2d2_massv", 2) |
| 183 | TLI_DEFINE_VECFUNC("llvm.log2.f64", "__log2d2_massv", 2) |
| 184 | TLI_DEFINE_VECFUNC("log2f", "__log2f4_massv", 4) |
| 185 | TLI_DEFINE_VECFUNC("llvm.log2.f32", "__log2f4_massv", 4) |
| 186 | |
| 187 | // Trigonometric Functions |
| 188 | TLI_DEFINE_VECFUNC("sin", "__sind2_massv", 2) |
| 189 | TLI_DEFINE_VECFUNC("llvm.sin.f64", "__sind2_massv", 2) |
| 190 | TLI_DEFINE_VECFUNC("sinf", "__sinf4_massv", 4) |
| 191 | TLI_DEFINE_VECFUNC("llvm.sin.f32", "__sinf4_massv", 4) |
| 192 | TLI_DEFINE_VECFUNC("cos", "__cosd2_massv", 2) |
| 193 | TLI_DEFINE_VECFUNC("llvm.cos.f64", "__cosd2_massv", 2) |
| 194 | TLI_DEFINE_VECFUNC("cosf", "__cosf4_massv", 4) |
| 195 | TLI_DEFINE_VECFUNC("llvm.cos.f32", "__cosf4_massv", 4) |
| 196 | TLI_DEFINE_VECFUNC("tan", "__tand2_massv", 2) |
| 197 | TLI_DEFINE_VECFUNC("tanf", "__tanf4_massv", 4) |
| 198 | TLI_DEFINE_VECFUNC("asin", "__asind2_massv", 2) |
| 199 | TLI_DEFINE_VECFUNC("asinf", "__asinf4_massv", 4) |
| 200 | TLI_DEFINE_VECFUNC("acos", "__acosd2_massv", 2) |
| 201 | TLI_DEFINE_VECFUNC("acosf", "__acosf4_massv", 4) |
| 202 | TLI_DEFINE_VECFUNC("atan", "__atand2_massv", 2) |
| 203 | TLI_DEFINE_VECFUNC("atanf", "__atanf4_massv", 4) |
| 204 | TLI_DEFINE_VECFUNC("atan2", "__atan2d2_massv", 2) |
| 205 | TLI_DEFINE_VECFUNC("atan2f", "__atan2f4_massv", 4) |
| 206 | |
| 207 | // Hyperbolic Functions |
| 208 | TLI_DEFINE_VECFUNC("sinh", "__sinhd2_massv", 2) |
| 209 | TLI_DEFINE_VECFUNC("sinhf", "__sinhf4_massv", 4) |
| 210 | TLI_DEFINE_VECFUNC("cosh", "__coshd2_massv", 2) |
| 211 | TLI_DEFINE_VECFUNC("coshf", "__coshf4_massv", 4) |
| 212 | TLI_DEFINE_VECFUNC("tanh", "__tanhd2_massv", 2) |
| 213 | TLI_DEFINE_VECFUNC("tanhf", "__tanhf4_massv", 4) |
| 214 | TLI_DEFINE_VECFUNC("asinh", "__asinhd2_massv", 2) |
| 215 | TLI_DEFINE_VECFUNC("asinhf", "__asinhf4_massv", 4) |
| 216 | TLI_DEFINE_VECFUNC("acosh", "__acoshd2_massv", 2) |
| 217 | TLI_DEFINE_VECFUNC("acoshf", "__acoshf4_massv", 4) |
| 218 | TLI_DEFINE_VECFUNC("atanh", "__atanhd2_massv", 2) |
| 219 | TLI_DEFINE_VECFUNC("atanhf", "__atanhf4_massv", 4) |
| 220 | |
| 221 | |
| 222 | #elif defined(TLI_DEFINE_SVML_VECFUNCS) |
| 223 | // Intel SVM library's Vector Functions |
| 224 | |
| 225 | TLI_DEFINE_VECFUNC("sin", "__svml_sin2", 2) |
| 226 | TLI_DEFINE_VECFUNC("sin", "__svml_sin4", 4) |
| 227 | TLI_DEFINE_VECFUNC("sin", "__svml_sin8", 8) |
| 228 | |
| 229 | TLI_DEFINE_VECFUNC("sinf", "__svml_sinf4", 4) |
| 230 | TLI_DEFINE_VECFUNC("sinf", "__svml_sinf8", 8) |
| 231 | TLI_DEFINE_VECFUNC("sinf", "__svml_sinf16", 16) |
| 232 | |
| 233 | TLI_DEFINE_VECFUNC("llvm.sin.f64", "__svml_sin2", 2) |
| 234 | TLI_DEFINE_VECFUNC("llvm.sin.f64", "__svml_sin4", 4) |
| 235 | TLI_DEFINE_VECFUNC("llvm.sin.f64", "__svml_sin8", 8) |
| 236 | |
| 237 | TLI_DEFINE_VECFUNC("llvm.sin.f32", "__svml_sinf4", 4) |
| 238 | TLI_DEFINE_VECFUNC("llvm.sin.f32", "__svml_sinf8", 8) |
| 239 | TLI_DEFINE_VECFUNC("llvm.sin.f32", "__svml_sinf16", 16) |
| 240 | |
| 241 | TLI_DEFINE_VECFUNC("cos", "__svml_cos2", 2) |
| 242 | TLI_DEFINE_VECFUNC("cos", "__svml_cos4", 4) |
| 243 | TLI_DEFINE_VECFUNC("cos", "__svml_cos8", 8) |
| 244 | |
| 245 | TLI_DEFINE_VECFUNC("cosf", "__svml_cosf4", 4) |
| 246 | TLI_DEFINE_VECFUNC("cosf", "__svml_cosf8", 8) |
| 247 | TLI_DEFINE_VECFUNC("cosf", "__svml_cosf16", 16) |
| 248 | |
| 249 | TLI_DEFINE_VECFUNC("llvm.cos.f64", "__svml_cos2", 2) |
| 250 | TLI_DEFINE_VECFUNC("llvm.cos.f64", "__svml_cos4", 4) |
| 251 | TLI_DEFINE_VECFUNC("llvm.cos.f64", "__svml_cos8", 8) |
| 252 | |
| 253 | TLI_DEFINE_VECFUNC("llvm.cos.f32", "__svml_cosf4", 4) |
| 254 | TLI_DEFINE_VECFUNC("llvm.cos.f32", "__svml_cosf8", 8) |
| 255 | TLI_DEFINE_VECFUNC("llvm.cos.f32", "__svml_cosf16", 16) |
| 256 | |
| 257 | TLI_DEFINE_VECFUNC("pow", "__svml_pow2", 2) |
| 258 | TLI_DEFINE_VECFUNC("pow", "__svml_pow4", 4) |
| 259 | TLI_DEFINE_VECFUNC("pow", "__svml_pow8", 8) |
| 260 | |
| 261 | TLI_DEFINE_VECFUNC("powf", "__svml_powf4", 4) |
| 262 | TLI_DEFINE_VECFUNC("powf", "__svml_powf8", 8) |
| 263 | TLI_DEFINE_VECFUNC("powf", "__svml_powf16", 16) |
| 264 | |
| 265 | TLI_DEFINE_VECFUNC("__pow_finite", "__svml_pow2", 2) |
| 266 | TLI_DEFINE_VECFUNC("__pow_finite", "__svml_pow4", 4) |
| 267 | TLI_DEFINE_VECFUNC("__pow_finite", "__svml_pow8", 8) |
| 268 | |
| 269 | TLI_DEFINE_VECFUNC("__powf_finite", "__svml_powf4", 4) |
| 270 | TLI_DEFINE_VECFUNC("__powf_finite", "__svml_powf8", 8) |
| 271 | TLI_DEFINE_VECFUNC("__powf_finite", "__svml_powf16", 16) |
| 272 | |
| 273 | TLI_DEFINE_VECFUNC("llvm.pow.f64", "__svml_pow2", 2) |
| 274 | TLI_DEFINE_VECFUNC("llvm.pow.f64", "__svml_pow4", 4) |
| 275 | TLI_DEFINE_VECFUNC("llvm.pow.f64", "__svml_pow8", 8) |
| 276 | |
| 277 | TLI_DEFINE_VECFUNC("llvm.pow.f32", "__svml_powf4", 4) |
| 278 | TLI_DEFINE_VECFUNC("llvm.pow.f32", "__svml_powf8", 8) |
| 279 | TLI_DEFINE_VECFUNC("llvm.pow.f32", "__svml_powf16", 16) |
| 280 | |
| 281 | TLI_DEFINE_VECFUNC("exp", "__svml_exp2", 2) |
| 282 | TLI_DEFINE_VECFUNC("exp", "__svml_exp4", 4) |
| 283 | TLI_DEFINE_VECFUNC("exp", "__svml_exp8", 8) |
| 284 | |
| 285 | TLI_DEFINE_VECFUNC("expf", "__svml_expf4", 4) |
| 286 | TLI_DEFINE_VECFUNC("expf", "__svml_expf8", 8) |
| 287 | TLI_DEFINE_VECFUNC("expf", "__svml_expf16", 16) |
| 288 | |
| 289 | TLI_DEFINE_VECFUNC("__exp_finite", "__svml_exp2", 2) |
| 290 | TLI_DEFINE_VECFUNC("__exp_finite", "__svml_exp4", 4) |
| 291 | TLI_DEFINE_VECFUNC("__exp_finite", "__svml_exp8", 8) |
| 292 | |
| 293 | TLI_DEFINE_VECFUNC("__expf_finite", "__svml_expf4", 4) |
| 294 | TLI_DEFINE_VECFUNC("__expf_finite", "__svml_expf8", 8) |
| 295 | TLI_DEFINE_VECFUNC("__expf_finite", "__svml_expf16", 16) |
| 296 | |
| 297 | TLI_DEFINE_VECFUNC("llvm.exp.f64", "__svml_exp2", 2) |
| 298 | TLI_DEFINE_VECFUNC("llvm.exp.f64", "__svml_exp4", 4) |
| 299 | TLI_DEFINE_VECFUNC("llvm.exp.f64", "__svml_exp8", 8) |
| 300 | |
| 301 | TLI_DEFINE_VECFUNC("llvm.exp.f32", "__svml_expf4", 4) |
| 302 | TLI_DEFINE_VECFUNC("llvm.exp.f32", "__svml_expf8", 8) |
| 303 | TLI_DEFINE_VECFUNC("llvm.exp.f32", "__svml_expf16", 16) |
| 304 | |
| 305 | TLI_DEFINE_VECFUNC("log", "__svml_log2", 2) |
| 306 | TLI_DEFINE_VECFUNC("log", "__svml_log4", 4) |
| 307 | TLI_DEFINE_VECFUNC("log", "__svml_log8", 8) |
| 308 | |
| 309 | TLI_DEFINE_VECFUNC("logf", "__svml_logf4", 4) |
| 310 | TLI_DEFINE_VECFUNC("logf", "__svml_logf8", 8) |
| 311 | TLI_DEFINE_VECFUNC("logf", "__svml_logf16", 16) |
| 312 | |
| 313 | TLI_DEFINE_VECFUNC("__log_finite", "__svml_log2", 2) |
| 314 | TLI_DEFINE_VECFUNC("__log_finite", "__svml_log4", 4) |
| 315 | TLI_DEFINE_VECFUNC("__log_finite", "__svml_log8", 8) |
| 316 | |
| 317 | TLI_DEFINE_VECFUNC("__logf_finite", "__svml_logf4", 4) |
| 318 | TLI_DEFINE_VECFUNC("__logf_finite", "__svml_logf8", 8) |
| 319 | TLI_DEFINE_VECFUNC("__logf_finite", "__svml_logf16", 16) |
| 320 | |
| 321 | TLI_DEFINE_VECFUNC("llvm.log.f64", "__svml_log2", 2) |
| 322 | TLI_DEFINE_VECFUNC("llvm.log.f64", "__svml_log4", 4) |
| 323 | TLI_DEFINE_VECFUNC("llvm.log.f64", "__svml_log8", 8) |
| 324 | |
| 325 | TLI_DEFINE_VECFUNC("llvm.log.f32", "__svml_logf4", 4) |
| 326 | TLI_DEFINE_VECFUNC("llvm.log.f32", "__svml_logf8", 8) |
| 327 | TLI_DEFINE_VECFUNC("llvm.log.f32", "__svml_logf16", 16) |
| 328 | |
Olivier Deprez | f4ef2d0 | 2021-04-20 13:36:24 +0200 | [diff] [blame] | 329 | TLI_DEFINE_VECFUNC("log2", "__svml_log22", 2) |
| 330 | TLI_DEFINE_VECFUNC("log2", "__svml_log24", 4) |
| 331 | TLI_DEFINE_VECFUNC("log2", "__svml_log28", 8) |
| 332 | |
| 333 | TLI_DEFINE_VECFUNC("log2f", "__svml_log2f4", 4) |
| 334 | TLI_DEFINE_VECFUNC("log2f", "__svml_log2f8", 8) |
| 335 | TLI_DEFINE_VECFUNC("log2f", "__svml_log2f16", 16) |
| 336 | |
| 337 | TLI_DEFINE_VECFUNC("__log2_finite", "__svml_log22", 2) |
| 338 | TLI_DEFINE_VECFUNC("__log2_finite", "__svml_log24", 4) |
| 339 | TLI_DEFINE_VECFUNC("__log2_finite", "__svml_log28", 8) |
| 340 | |
| 341 | TLI_DEFINE_VECFUNC("__log2f_finite", "__svml_log2f4", 4) |
| 342 | TLI_DEFINE_VECFUNC("__log2f_finite", "__svml_log2f8", 8) |
| 343 | TLI_DEFINE_VECFUNC("__log2f_finite", "__svml_log2f16", 16) |
| 344 | |
| 345 | TLI_DEFINE_VECFUNC("llvm.log2.f64", "__svml_log22", 2) |
| 346 | TLI_DEFINE_VECFUNC("llvm.log2.f64", "__svml_log24", 4) |
| 347 | TLI_DEFINE_VECFUNC("llvm.log2.f64", "__svml_log28", 8) |
| 348 | |
| 349 | TLI_DEFINE_VECFUNC("llvm.log2.f32", "__svml_log2f4", 4) |
| 350 | TLI_DEFINE_VECFUNC("llvm.log2.f32", "__svml_log2f8", 8) |
| 351 | TLI_DEFINE_VECFUNC("llvm.log2.f32", "__svml_log2f16", 16) |
| 352 | |
| 353 | TLI_DEFINE_VECFUNC("log10", "__svml_log102", 2) |
| 354 | TLI_DEFINE_VECFUNC("log10", "__svml_log104", 4) |
| 355 | TLI_DEFINE_VECFUNC("log10", "__svml_log108", 8) |
| 356 | |
| 357 | TLI_DEFINE_VECFUNC("log10f", "__svml_log10f4", 4) |
| 358 | TLI_DEFINE_VECFUNC("log10f", "__svml_log10f8", 8) |
| 359 | TLI_DEFINE_VECFUNC("log10f", "__svml_log10f16", 16) |
| 360 | |
| 361 | TLI_DEFINE_VECFUNC("__log10_finite", "__svml_log102", 2) |
| 362 | TLI_DEFINE_VECFUNC("__log10_finite", "__svml_log104", 4) |
| 363 | TLI_DEFINE_VECFUNC("__log10_finite", "__svml_log108", 8) |
| 364 | |
| 365 | TLI_DEFINE_VECFUNC("__log10f_finite", "__svml_log10f4", 4) |
| 366 | TLI_DEFINE_VECFUNC("__log10f_finite", "__svml_log10f8", 8) |
| 367 | TLI_DEFINE_VECFUNC("__log10f_finite", "__svml_log10f16", 16) |
| 368 | |
| 369 | TLI_DEFINE_VECFUNC("llvm.log10.f64", "__svml_log102", 2) |
| 370 | TLI_DEFINE_VECFUNC("llvm.log10.f64", "__svml_log104", 4) |
| 371 | TLI_DEFINE_VECFUNC("llvm.log10.f64", "__svml_log108", 8) |
| 372 | |
| 373 | TLI_DEFINE_VECFUNC("llvm.log10.f32", "__svml_log10f4", 4) |
| 374 | TLI_DEFINE_VECFUNC("llvm.log10.f32", "__svml_log10f8", 8) |
| 375 | TLI_DEFINE_VECFUNC("llvm.log10.f32", "__svml_log10f16", 16) |
| 376 | |
| 377 | TLI_DEFINE_VECFUNC("sqrt", "__svml_sqrt2", 2) |
| 378 | TLI_DEFINE_VECFUNC("sqrt", "__svml_sqrt4", 4) |
| 379 | TLI_DEFINE_VECFUNC("sqrt", "__svml_sqrt8", 8) |
| 380 | |
| 381 | TLI_DEFINE_VECFUNC("sqrtf", "__svml_sqrtf4", 4) |
| 382 | TLI_DEFINE_VECFUNC("sqrtf", "__svml_sqrtf8", 8) |
| 383 | TLI_DEFINE_VECFUNC("sqrtf", "__svml_sqrtf16", 16) |
| 384 | |
| 385 | TLI_DEFINE_VECFUNC("__sqrt_finite", "__svml_sqrt2", 2) |
| 386 | TLI_DEFINE_VECFUNC("__sqrt_finite", "__svml_sqrt4", 4) |
| 387 | TLI_DEFINE_VECFUNC("__sqrt_finite", "__svml_sqrt8", 8) |
| 388 | |
| 389 | TLI_DEFINE_VECFUNC("__sqrtf_finite", "__svml_sqrtf4", 4) |
| 390 | TLI_DEFINE_VECFUNC("__sqrtf_finite", "__svml_sqrtf8", 8) |
| 391 | TLI_DEFINE_VECFUNC("__sqrtf_finite", "__svml_sqrtf16", 16) |
| 392 | |
| 393 | TLI_DEFINE_VECFUNC("exp2", "__svml_exp22", 2) |
| 394 | TLI_DEFINE_VECFUNC("exp2", "__svml_exp24", 4) |
| 395 | TLI_DEFINE_VECFUNC("exp2", "__svml_exp28", 8) |
| 396 | |
| 397 | TLI_DEFINE_VECFUNC("exp2f", "__svml_exp2f4", 4) |
| 398 | TLI_DEFINE_VECFUNC("exp2f", "__svml_exp2f8", 8) |
| 399 | TLI_DEFINE_VECFUNC("exp2f", "__svml_exp2f16", 16) |
| 400 | |
| 401 | TLI_DEFINE_VECFUNC("llvm.exp2.f64", "__svml_exp22", 2) |
| 402 | TLI_DEFINE_VECFUNC("llvm.exp2.f64", "__svml_exp24", 4) |
| 403 | TLI_DEFINE_VECFUNC("llvm.exp2.f64", "__svml_exp28", 8) |
| 404 | |
| 405 | TLI_DEFINE_VECFUNC("llvm.exp2.f32", "__svml_exp2f4", 4) |
| 406 | TLI_DEFINE_VECFUNC("llvm.exp2.f32", "__svml_exp2f8", 8) |
| 407 | TLI_DEFINE_VECFUNC("llvm.exp2.f32", "__svml_exp2f16", 16) |
| 408 | |
| 409 | TLI_DEFINE_VECFUNC("__exp2_finite", "__svml_exp22", 2) |
| 410 | TLI_DEFINE_VECFUNC("__exp2_finite", "__svml_exp24", 4) |
| 411 | TLI_DEFINE_VECFUNC("__exp2_finite", "__svml_exp28", 8) |
| 412 | |
| 413 | TLI_DEFINE_VECFUNC("__exp2f_finite", "__svml_exp2f4", 4) |
| 414 | TLI_DEFINE_VECFUNC("__exp2f_finite", "__svml_exp2f8", 8) |
| 415 | TLI_DEFINE_VECFUNC("__exp2f_finite", "__svml_exp2f16", 16) |
Andrew Walbran | 3d2c197 | 2020-04-07 12:24:26 +0100 | [diff] [blame] | 416 | |
| 417 | #else |
| 418 | #error "Must choose which vector library functions are to be defined." |
| 419 | #endif |
| 420 | |
| 421 | #undef TLI_DEFINE_VECFUNC |
| 422 | #undef TLI_DEFINE_ACCELERATE_VECFUNCS |
Olivier Deprez | f4ef2d0 | 2021-04-20 13:36:24 +0200 | [diff] [blame] | 423 | #undef TLI_DEFINE_LIBMVEC_X86_VECFUNCS |
Andrew Walbran | 3d2c197 | 2020-04-07 12:24:26 +0100 | [diff] [blame] | 424 | #undef TLI_DEFINE_MASSV_VECFUNCS |
| 425 | #undef TLI_DEFINE_SVML_VECFUNCS |
Olivier Deprez | f4ef2d0 | 2021-04-20 13:36:24 +0200 | [diff] [blame] | 426 | #undef TLI_DEFINE_MASSV_VECFUNCS_NAMES |