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