Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 1 | //===- IntrinsicsSystemZ.td - Defines SystemZ intrinsics ---*- tablegen -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file defines all of the SystemZ-specific intrinsics. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | class SystemZUnaryConv<string name, LLVMType result, LLVMType arg> |
| 15 | : GCCBuiltin<"__builtin_s390_" ## name>, |
| 16 | Intrinsic<[result], [arg], [IntrNoMem]>; |
| 17 | |
| 18 | class SystemZUnary<string name, LLVMType type> |
| 19 | : SystemZUnaryConv<name, type, type>; |
| 20 | |
| 21 | class SystemZUnaryConvCC<LLVMType result, LLVMType arg> |
| 22 | : Intrinsic<[result, llvm_i32_ty], [arg], [IntrNoMem]>; |
| 23 | |
| 24 | class SystemZUnaryCC<LLVMType type> |
| 25 | : SystemZUnaryConvCC<type, type>; |
| 26 | |
| 27 | class SystemZBinaryConv<string name, LLVMType result, LLVMType arg> |
| 28 | : GCCBuiltin<"__builtin_s390_" ## name>, |
| 29 | Intrinsic<[result], [arg, arg], [IntrNoMem]>; |
| 30 | |
| 31 | class SystemZBinary<string name, LLVMType type> |
| 32 | : SystemZBinaryConv<name, type, type>; |
| 33 | |
| 34 | class SystemZBinaryInt<string name, LLVMType type> |
| 35 | : GCCBuiltin<"__builtin_s390_" ## name>, |
| 36 | Intrinsic<[type], [type, llvm_i32_ty], [IntrNoMem]>; |
| 37 | |
| 38 | class SystemZBinaryConvCC<LLVMType result, LLVMType arg> |
| 39 | : Intrinsic<[result, llvm_i32_ty], [arg, arg], [IntrNoMem]>; |
| 40 | |
| 41 | class SystemZBinaryConvIntCC<LLVMType result, LLVMType arg> |
| 42 | : Intrinsic<[result, llvm_i32_ty], [arg, llvm_i32_ty], [IntrNoMem]>; |
| 43 | |
| 44 | class SystemZBinaryCC<LLVMType type> |
| 45 | : SystemZBinaryConvCC<type, type>; |
| 46 | |
| 47 | class SystemZTernaryConv<string name, LLVMType result, LLVMType arg> |
| 48 | : GCCBuiltin<"__builtin_s390_" ## name>, |
| 49 | Intrinsic<[result], [arg, arg, result], [IntrNoMem]>; |
| 50 | |
| 51 | class SystemZTernary<string name, LLVMType type> |
| 52 | : SystemZTernaryConv<name, type, type>; |
| 53 | |
| 54 | class SystemZTernaryInt<string name, LLVMType type> |
| 55 | : GCCBuiltin<"__builtin_s390_" ## name>, |
| 56 | Intrinsic<[type], [type, type, llvm_i32_ty], [IntrNoMem]>; |
| 57 | |
| 58 | class SystemZTernaryIntCC<LLVMType type> |
| 59 | : Intrinsic<[type, llvm_i32_ty], [type, type, llvm_i32_ty], [IntrNoMem]>; |
| 60 | |
| 61 | class SystemZQuaternaryInt<string name, LLVMType type> |
| 62 | : GCCBuiltin<"__builtin_s390_" ## name>, |
| 63 | Intrinsic<[type], [type, type, type, llvm_i32_ty], [IntrNoMem]>; |
| 64 | |
| 65 | class SystemZQuaternaryIntCC<LLVMType type> |
| 66 | : Intrinsic<[type, llvm_i32_ty], [type, type, type, llvm_i32_ty], |
| 67 | [IntrNoMem]>; |
| 68 | |
| 69 | multiclass SystemZUnaryExtBHF<string name> { |
| 70 | def b : SystemZUnaryConv<name##"b", llvm_v8i16_ty, llvm_v16i8_ty>; |
| 71 | def h : SystemZUnaryConv<name##"h", llvm_v4i32_ty, llvm_v8i16_ty>; |
| 72 | def f : SystemZUnaryConv<name##"f", llvm_v2i64_ty, llvm_v4i32_ty>; |
| 73 | } |
| 74 | |
| 75 | multiclass SystemZUnaryExtBHWF<string name> { |
| 76 | def b : SystemZUnaryConv<name##"b", llvm_v8i16_ty, llvm_v16i8_ty>; |
| 77 | def hw : SystemZUnaryConv<name##"hw", llvm_v4i32_ty, llvm_v8i16_ty>; |
| 78 | def f : SystemZUnaryConv<name##"f", llvm_v2i64_ty, llvm_v4i32_ty>; |
| 79 | } |
| 80 | |
| 81 | multiclass SystemZUnaryBHF<string name> { |
| 82 | def b : SystemZUnary<name##"b", llvm_v16i8_ty>; |
| 83 | def h : SystemZUnary<name##"h", llvm_v8i16_ty>; |
| 84 | def f : SystemZUnary<name##"f", llvm_v4i32_ty>; |
| 85 | } |
| 86 | |
| 87 | multiclass SystemZUnaryBHFG<string name> : SystemZUnaryBHF<name> { |
| 88 | def g : SystemZUnary<name##"g", llvm_v2i64_ty>; |
| 89 | } |
| 90 | |
| 91 | multiclass SystemZUnaryCCBHF { |
| 92 | def bs : SystemZUnaryCC<llvm_v16i8_ty>; |
| 93 | def hs : SystemZUnaryCC<llvm_v8i16_ty>; |
| 94 | def fs : SystemZUnaryCC<llvm_v4i32_ty>; |
| 95 | } |
| 96 | |
| 97 | multiclass SystemZBinaryTruncHFG<string name> { |
| 98 | def h : SystemZBinaryConv<name##"h", llvm_v16i8_ty, llvm_v8i16_ty>; |
| 99 | def f : SystemZBinaryConv<name##"f", llvm_v8i16_ty, llvm_v4i32_ty>; |
| 100 | def g : SystemZBinaryConv<name##"g", llvm_v4i32_ty, llvm_v2i64_ty>; |
| 101 | } |
| 102 | |
| 103 | multiclass SystemZBinaryTruncCCHFG { |
| 104 | def hs : SystemZBinaryConvCC<llvm_v16i8_ty, llvm_v8i16_ty>; |
| 105 | def fs : SystemZBinaryConvCC<llvm_v8i16_ty, llvm_v4i32_ty>; |
| 106 | def gs : SystemZBinaryConvCC<llvm_v4i32_ty, llvm_v2i64_ty>; |
| 107 | } |
| 108 | |
| 109 | multiclass SystemZBinaryExtBHF<string name> { |
| 110 | def b : SystemZBinaryConv<name##"b", llvm_v8i16_ty, llvm_v16i8_ty>; |
| 111 | def h : SystemZBinaryConv<name##"h", llvm_v4i32_ty, llvm_v8i16_ty>; |
| 112 | def f : SystemZBinaryConv<name##"f", llvm_v2i64_ty, llvm_v4i32_ty>; |
| 113 | } |
| 114 | |
| 115 | multiclass SystemZBinaryExtBHFG<string name> : SystemZBinaryExtBHF<name> { |
| 116 | def g : SystemZBinaryConv<name##"g", llvm_v16i8_ty, llvm_v2i64_ty>; |
| 117 | } |
| 118 | |
| 119 | multiclass SystemZBinaryBHF<string name> { |
| 120 | def b : SystemZBinary<name##"b", llvm_v16i8_ty>; |
| 121 | def h : SystemZBinary<name##"h", llvm_v8i16_ty>; |
| 122 | def f : SystemZBinary<name##"f", llvm_v4i32_ty>; |
| 123 | } |
| 124 | |
| 125 | multiclass SystemZBinaryBHFG<string name> : SystemZBinaryBHF<name> { |
| 126 | def g : SystemZBinary<name##"g", llvm_v2i64_ty>; |
| 127 | } |
| 128 | |
| 129 | multiclass SystemZBinaryIntBHFG<string name> { |
| 130 | def b : SystemZBinaryInt<name##"b", llvm_v16i8_ty>; |
| 131 | def h : SystemZBinaryInt<name##"h", llvm_v8i16_ty>; |
| 132 | def f : SystemZBinaryInt<name##"f", llvm_v4i32_ty>; |
| 133 | def g : SystemZBinaryInt<name##"g", llvm_v2i64_ty>; |
| 134 | } |
| 135 | |
| 136 | multiclass SystemZBinaryCCBHF { |
| 137 | def bs : SystemZBinaryCC<llvm_v16i8_ty>; |
| 138 | def hs : SystemZBinaryCC<llvm_v8i16_ty>; |
| 139 | def fs : SystemZBinaryCC<llvm_v4i32_ty>; |
| 140 | } |
| 141 | |
| 142 | multiclass SystemZCompareBHFG<string name> { |
| 143 | def bs : SystemZBinaryCC<llvm_v16i8_ty>; |
| 144 | def hs : SystemZBinaryCC<llvm_v8i16_ty>; |
| 145 | def fs : SystemZBinaryCC<llvm_v4i32_ty>; |
| 146 | def gs : SystemZBinaryCC<llvm_v2i64_ty>; |
| 147 | } |
| 148 | |
| 149 | multiclass SystemZTernaryExtBHF<string name> { |
| 150 | def b : SystemZTernaryConv<name##"b", llvm_v8i16_ty, llvm_v16i8_ty>; |
| 151 | def h : SystemZTernaryConv<name##"h", llvm_v4i32_ty, llvm_v8i16_ty>; |
| 152 | def f : SystemZTernaryConv<name##"f", llvm_v2i64_ty, llvm_v4i32_ty>; |
| 153 | } |
| 154 | |
| 155 | multiclass SystemZTernaryExtBHFG<string name> : SystemZTernaryExtBHF<name> { |
| 156 | def g : SystemZTernaryConv<name##"g", llvm_v16i8_ty, llvm_v2i64_ty>; |
| 157 | } |
| 158 | |
| 159 | multiclass SystemZTernaryBHF<string name> { |
| 160 | def b : SystemZTernary<name##"b", llvm_v16i8_ty>; |
| 161 | def h : SystemZTernary<name##"h", llvm_v8i16_ty>; |
| 162 | def f : SystemZTernary<name##"f", llvm_v4i32_ty>; |
| 163 | } |
| 164 | |
| 165 | multiclass SystemZTernaryIntBHF<string name> { |
| 166 | def b : SystemZTernaryInt<name##"b", llvm_v16i8_ty>; |
| 167 | def h : SystemZTernaryInt<name##"h", llvm_v8i16_ty>; |
| 168 | def f : SystemZTernaryInt<name##"f", llvm_v4i32_ty>; |
| 169 | } |
| 170 | |
| 171 | multiclass SystemZTernaryIntCCBHF { |
| 172 | def bs : SystemZTernaryIntCC<llvm_v16i8_ty>; |
| 173 | def hs : SystemZTernaryIntCC<llvm_v8i16_ty>; |
| 174 | def fs : SystemZTernaryIntCC<llvm_v4i32_ty>; |
| 175 | } |
| 176 | |
| 177 | multiclass SystemZQuaternaryIntBHF<string name> { |
| 178 | def b : SystemZQuaternaryInt<name##"b", llvm_v16i8_ty>; |
| 179 | def h : SystemZQuaternaryInt<name##"h", llvm_v8i16_ty>; |
| 180 | def f : SystemZQuaternaryInt<name##"f", llvm_v4i32_ty>; |
| 181 | } |
| 182 | |
| 183 | multiclass SystemZQuaternaryIntBHFG<string name> : SystemZQuaternaryIntBHF<name> { |
| 184 | def g : SystemZQuaternaryInt<name##"g", llvm_v2i64_ty>; |
| 185 | } |
| 186 | |
| 187 | multiclass SystemZQuaternaryIntCCBHF { |
| 188 | def bs : SystemZQuaternaryIntCC<llvm_v16i8_ty>; |
| 189 | def hs : SystemZQuaternaryIntCC<llvm_v8i16_ty>; |
| 190 | def fs : SystemZQuaternaryIntCC<llvm_v4i32_ty>; |
| 191 | } |
| 192 | |
| 193 | //===----------------------------------------------------------------------===// |
| 194 | // |
| 195 | // Transactional-execution intrinsics |
| 196 | // |
| 197 | //===----------------------------------------------------------------------===// |
| 198 | |
| 199 | let TargetPrefix = "s390" in { |
| 200 | def int_s390_tbegin : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty, llvm_i32_ty], |
| 201 | [IntrNoDuplicate, IntrWriteMem]>; |
| 202 | |
| 203 | def int_s390_tbegin_nofloat : Intrinsic<[llvm_i32_ty], |
| 204 | [llvm_ptr_ty, llvm_i32_ty], |
| 205 | [IntrNoDuplicate, IntrWriteMem]>; |
| 206 | |
| 207 | def int_s390_tbeginc : Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty], |
| 208 | [IntrNoDuplicate, IntrWriteMem]>; |
| 209 | |
| 210 | def int_s390_tabort : Intrinsic<[], [llvm_i64_ty], |
| 211 | [IntrNoReturn, Throws, IntrWriteMem]>; |
| 212 | |
| 213 | def int_s390_tend : GCCBuiltin<"__builtin_tend">, |
| 214 | Intrinsic<[llvm_i32_ty], []>; |
| 215 | |
| 216 | def int_s390_etnd : GCCBuiltin<"__builtin_tx_nesting_depth">, |
| 217 | Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>; |
| 218 | |
| 219 | def int_s390_ntstg : Intrinsic<[], [llvm_i64_ty, llvm_ptr64_ty], |
| 220 | [IntrArgMemOnly, IntrWriteMem]>; |
| 221 | |
| 222 | def int_s390_ppa_txassist : GCCBuiltin<"__builtin_tx_assist">, |
| 223 | Intrinsic<[], [llvm_i32_ty]>; |
| 224 | } |
| 225 | |
| 226 | //===----------------------------------------------------------------------===// |
| 227 | // |
| 228 | // Vector intrinsics |
| 229 | // |
| 230 | //===----------------------------------------------------------------------===// |
| 231 | |
| 232 | let TargetPrefix = "s390" in { |
| 233 | def int_s390_lcbb : GCCBuiltin<"__builtin_s390_lcbb">, |
| 234 | Intrinsic<[llvm_i32_ty], [llvm_ptr_ty, llvm_i32_ty], |
| 235 | [IntrNoMem]>; |
| 236 | |
| 237 | def int_s390_vlbb : GCCBuiltin<"__builtin_s390_vlbb">, |
| 238 | Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty, llvm_i32_ty], |
| 239 | [IntrReadMem, IntrArgMemOnly]>; |
| 240 | |
| 241 | def int_s390_vll : GCCBuiltin<"__builtin_s390_vll">, |
| 242 | Intrinsic<[llvm_v16i8_ty], [llvm_i32_ty, llvm_ptr_ty], |
| 243 | [IntrReadMem, IntrArgMemOnly]>; |
| 244 | |
| 245 | def int_s390_vpdi : GCCBuiltin<"__builtin_s390_vpdi">, |
| 246 | Intrinsic<[llvm_v2i64_ty], |
| 247 | [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty], |
| 248 | [IntrNoMem]>; |
| 249 | |
| 250 | def int_s390_vperm : GCCBuiltin<"__builtin_s390_vperm">, |
| 251 | Intrinsic<[llvm_v16i8_ty], |
| 252 | [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty], |
| 253 | [IntrNoMem]>; |
| 254 | |
| 255 | defm int_s390_vpks : SystemZBinaryTruncHFG<"vpks">; |
| 256 | defm int_s390_vpks : SystemZBinaryTruncCCHFG; |
| 257 | |
| 258 | defm int_s390_vpkls : SystemZBinaryTruncHFG<"vpkls">; |
| 259 | defm int_s390_vpkls : SystemZBinaryTruncCCHFG; |
| 260 | |
| 261 | def int_s390_vstl : GCCBuiltin<"__builtin_s390_vstl">, |
| 262 | Intrinsic<[], [llvm_v16i8_ty, llvm_i32_ty, llvm_ptr_ty], |
| 263 | [IntrArgMemOnly, IntrWriteMem]>; |
| 264 | |
| 265 | defm int_s390_vupl : SystemZUnaryExtBHWF<"vupl">; |
| 266 | defm int_s390_vupll : SystemZUnaryExtBHF<"vupll">; |
| 267 | |
| 268 | defm int_s390_vuph : SystemZUnaryExtBHF<"vuph">; |
| 269 | defm int_s390_vuplh : SystemZUnaryExtBHF<"vuplh">; |
| 270 | |
| 271 | defm int_s390_vacc : SystemZBinaryBHFG<"vacc">; |
| 272 | |
| 273 | def int_s390_vaq : SystemZBinary<"vaq", llvm_v16i8_ty>; |
| 274 | def int_s390_vacq : SystemZTernary<"vacq", llvm_v16i8_ty>; |
| 275 | def int_s390_vaccq : SystemZBinary<"vaccq", llvm_v16i8_ty>; |
| 276 | def int_s390_vacccq : SystemZTernary<"vacccq", llvm_v16i8_ty>; |
| 277 | |
| 278 | defm int_s390_vavg : SystemZBinaryBHFG<"vavg">; |
| 279 | defm int_s390_vavgl : SystemZBinaryBHFG<"vavgl">; |
| 280 | |
| 281 | def int_s390_vcksm : SystemZBinary<"vcksm", llvm_v4i32_ty>; |
| 282 | |
| 283 | defm int_s390_vgfm : SystemZBinaryExtBHFG<"vgfm">; |
| 284 | defm int_s390_vgfma : SystemZTernaryExtBHFG<"vgfma">; |
| 285 | |
| 286 | defm int_s390_vmah : SystemZTernaryBHF<"vmah">; |
| 287 | defm int_s390_vmalh : SystemZTernaryBHF<"vmalh">; |
| 288 | defm int_s390_vmae : SystemZTernaryExtBHF<"vmae">; |
| 289 | defm int_s390_vmale : SystemZTernaryExtBHF<"vmale">; |
| 290 | defm int_s390_vmao : SystemZTernaryExtBHF<"vmao">; |
| 291 | defm int_s390_vmalo : SystemZTernaryExtBHF<"vmalo">; |
| 292 | |
| 293 | defm int_s390_vmh : SystemZBinaryBHF<"vmh">; |
| 294 | defm int_s390_vmlh : SystemZBinaryBHF<"vmlh">; |
| 295 | defm int_s390_vme : SystemZBinaryExtBHF<"vme">; |
| 296 | defm int_s390_vmle : SystemZBinaryExtBHF<"vmle">; |
| 297 | defm int_s390_vmo : SystemZBinaryExtBHF<"vmo">; |
| 298 | defm int_s390_vmlo : SystemZBinaryExtBHF<"vmlo">; |
| 299 | |
| 300 | defm int_s390_verllv : SystemZBinaryBHFG<"verllv">; |
| 301 | defm int_s390_verll : SystemZBinaryIntBHFG<"verll">; |
| 302 | defm int_s390_verim : SystemZQuaternaryIntBHFG<"verim">; |
| 303 | |
| 304 | def int_s390_vsl : SystemZBinary<"vsl", llvm_v16i8_ty>; |
| 305 | def int_s390_vslb : SystemZBinary<"vslb", llvm_v16i8_ty>; |
| 306 | def int_s390_vsra : SystemZBinary<"vsra", llvm_v16i8_ty>; |
| 307 | def int_s390_vsrab : SystemZBinary<"vsrab", llvm_v16i8_ty>; |
| 308 | def int_s390_vsrl : SystemZBinary<"vsrl", llvm_v16i8_ty>; |
| 309 | def int_s390_vsrlb : SystemZBinary<"vsrlb", llvm_v16i8_ty>; |
| 310 | |
| 311 | def int_s390_vsldb : GCCBuiltin<"__builtin_s390_vsldb">, |
| 312 | Intrinsic<[llvm_v16i8_ty], |
| 313 | [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty], |
| 314 | [IntrNoMem]>; |
| 315 | |
| 316 | defm int_s390_vscbi : SystemZBinaryBHFG<"vscbi">; |
| 317 | |
| 318 | def int_s390_vsq : SystemZBinary<"vsq", llvm_v16i8_ty>; |
| 319 | def int_s390_vsbiq : SystemZTernary<"vsbiq", llvm_v16i8_ty>; |
| 320 | def int_s390_vscbiq : SystemZBinary<"vscbiq", llvm_v16i8_ty>; |
| 321 | def int_s390_vsbcbiq : SystemZTernary<"vsbcbiq", llvm_v16i8_ty>; |
| 322 | |
| 323 | def int_s390_vsumb : SystemZBinaryConv<"vsumb", llvm_v4i32_ty, llvm_v16i8_ty>; |
| 324 | def int_s390_vsumh : SystemZBinaryConv<"vsumh", llvm_v4i32_ty, llvm_v8i16_ty>; |
| 325 | |
| 326 | def int_s390_vsumgh : SystemZBinaryConv<"vsumgh", llvm_v2i64_ty, |
| 327 | llvm_v8i16_ty>; |
| 328 | def int_s390_vsumgf : SystemZBinaryConv<"vsumgf", llvm_v2i64_ty, |
| 329 | llvm_v4i32_ty>; |
| 330 | |
| 331 | def int_s390_vsumqf : SystemZBinaryConv<"vsumqf", llvm_v16i8_ty, |
| 332 | llvm_v4i32_ty>; |
| 333 | def int_s390_vsumqg : SystemZBinaryConv<"vsumqg", llvm_v16i8_ty, |
| 334 | llvm_v2i64_ty>; |
| 335 | |
| 336 | def int_s390_vtm : SystemZBinaryConv<"vtm", llvm_i32_ty, llvm_v16i8_ty>; |
| 337 | |
| 338 | defm int_s390_vceq : SystemZCompareBHFG<"vceq">; |
| 339 | defm int_s390_vch : SystemZCompareBHFG<"vch">; |
| 340 | defm int_s390_vchl : SystemZCompareBHFG<"vchl">; |
| 341 | |
| 342 | defm int_s390_vfae : SystemZTernaryIntBHF<"vfae">; |
| 343 | defm int_s390_vfae : SystemZTernaryIntCCBHF; |
| 344 | defm int_s390_vfaez : SystemZTernaryIntBHF<"vfaez">; |
| 345 | defm int_s390_vfaez : SystemZTernaryIntCCBHF; |
| 346 | |
| 347 | defm int_s390_vfee : SystemZBinaryBHF<"vfee">; |
| 348 | defm int_s390_vfee : SystemZBinaryCCBHF; |
| 349 | defm int_s390_vfeez : SystemZBinaryBHF<"vfeez">; |
| 350 | defm int_s390_vfeez : SystemZBinaryCCBHF; |
| 351 | |
| 352 | defm int_s390_vfene : SystemZBinaryBHF<"vfene">; |
| 353 | defm int_s390_vfene : SystemZBinaryCCBHF; |
| 354 | defm int_s390_vfenez : SystemZBinaryBHF<"vfenez">; |
| 355 | defm int_s390_vfenez : SystemZBinaryCCBHF; |
| 356 | |
| 357 | defm int_s390_vistr : SystemZUnaryBHF<"vistr">; |
| 358 | defm int_s390_vistr : SystemZUnaryCCBHF; |
| 359 | |
| 360 | defm int_s390_vstrc : SystemZQuaternaryIntBHF<"vstrc">; |
| 361 | defm int_s390_vstrc : SystemZQuaternaryIntCCBHF; |
| 362 | defm int_s390_vstrcz : SystemZQuaternaryIntBHF<"vstrcz">; |
| 363 | defm int_s390_vstrcz : SystemZQuaternaryIntCCBHF; |
| 364 | |
| 365 | def int_s390_vfcedbs : SystemZBinaryConvCC<llvm_v2i64_ty, llvm_v2f64_ty>; |
| 366 | def int_s390_vfchdbs : SystemZBinaryConvCC<llvm_v2i64_ty, llvm_v2f64_ty>; |
| 367 | def int_s390_vfchedbs : SystemZBinaryConvCC<llvm_v2i64_ty, llvm_v2f64_ty>; |
| 368 | |
| 369 | def int_s390_vftcidb : SystemZBinaryConvIntCC<llvm_v2i64_ty, llvm_v2f64_ty>; |
| 370 | |
| 371 | def int_s390_vfidb : Intrinsic<[llvm_v2f64_ty], |
| 372 | [llvm_v2f64_ty, llvm_i32_ty, llvm_i32_ty], |
| 373 | [IntrNoMem]>; |
| 374 | |
| 375 | // Instructions from the Vector Enhancements Facility 1 |
| 376 | def int_s390_vbperm : SystemZBinaryConv<"vbperm", llvm_v2i64_ty, |
| 377 | llvm_v16i8_ty>; |
| 378 | |
| 379 | def int_s390_vmslg : GCCBuiltin<"__builtin_s390_vmslg">, |
| 380 | Intrinsic<[llvm_v16i8_ty], |
| 381 | [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v16i8_ty, |
| 382 | llvm_i32_ty], [IntrNoMem]>; |
| 383 | |
| 384 | def int_s390_vfmaxdb : Intrinsic<[llvm_v2f64_ty], |
| 385 | [llvm_v2f64_ty, llvm_v2f64_ty, llvm_i32_ty], |
| 386 | [IntrNoMem]>; |
| 387 | def int_s390_vfmindb : Intrinsic<[llvm_v2f64_ty], |
| 388 | [llvm_v2f64_ty, llvm_v2f64_ty, llvm_i32_ty], |
| 389 | [IntrNoMem]>; |
| 390 | def int_s390_vfmaxsb : Intrinsic<[llvm_v4f32_ty], |
| 391 | [llvm_v4f32_ty, llvm_v4f32_ty, llvm_i32_ty], |
| 392 | [IntrNoMem]>; |
| 393 | def int_s390_vfminsb : Intrinsic<[llvm_v4f32_ty], |
| 394 | [llvm_v4f32_ty, llvm_v4f32_ty, llvm_i32_ty], |
| 395 | [IntrNoMem]>; |
| 396 | |
| 397 | def int_s390_vfcesbs : SystemZBinaryConvCC<llvm_v4i32_ty, llvm_v4f32_ty>; |
| 398 | def int_s390_vfchsbs : SystemZBinaryConvCC<llvm_v4i32_ty, llvm_v4f32_ty>; |
| 399 | def int_s390_vfchesbs : SystemZBinaryConvCC<llvm_v4i32_ty, llvm_v4f32_ty>; |
| 400 | |
| 401 | def int_s390_vftcisb : SystemZBinaryConvIntCC<llvm_v4i32_ty, llvm_v4f32_ty>; |
| 402 | |
| 403 | def int_s390_vfisb : Intrinsic<[llvm_v4f32_ty], |
| 404 | [llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty], |
| 405 | [IntrNoMem]>; |
| 406 | |
| 407 | // Instructions from the Vector Packed Decimal Facility |
| 408 | def int_s390_vlrl : GCCBuiltin<"__builtin_s390_vlrl">, |
| 409 | Intrinsic<[llvm_v16i8_ty], [llvm_i32_ty, llvm_ptr_ty], |
| 410 | [IntrReadMem, IntrArgMemOnly]>; |
| 411 | |
| 412 | def int_s390_vstrl : GCCBuiltin<"__builtin_s390_vstrl">, |
| 413 | Intrinsic<[], [llvm_v16i8_ty, llvm_i32_ty, llvm_ptr_ty], |
| 414 | [IntrArgMemOnly, IntrWriteMem]>; |
| 415 | } |
| 416 | |
| 417 | //===----------------------------------------------------------------------===// |
| 418 | // |
| 419 | // Misc intrinsics |
| 420 | // |
| 421 | //===----------------------------------------------------------------------===// |
| 422 | |
| 423 | let TargetPrefix = "s390" in { |
| 424 | def int_s390_sfpc : GCCBuiltin<"__builtin_s390_sfpc">, |
| 425 | Intrinsic<[], [llvm_i32_ty], []>; |
| 426 | def int_s390_efpc : GCCBuiltin<"__builtin_s390_efpc">, |
| 427 | Intrinsic<[llvm_i32_ty], [], []>; |
| 428 | |
| 429 | def int_s390_tdc : Intrinsic<[llvm_i32_ty], [llvm_anyfloat_ty, llvm_i64_ty], |
| 430 | [IntrNoMem]>; |
| 431 | } |