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