blob: bc044a4a6f858e42104439de37885d1ff205e4d5 [file] [log] [blame]
Reid Klecknerf5890e42018-06-23 02:02:38 +00001// RUN: llvm-tblgen -gen-intrinsic-enums %s | FileCheck %s
Artem Belevich786ca6a2017-10-12 17:40:00 +00002// XFAIL: vg_leak
3
sstefan199d18f72020-08-26 10:37:48 +02004class IntrinsicProperty<bit is_default = 0> {
5 bit IsDefault = is_default;
6}
7
Matt Arsenault303327d2017-12-20 19:36:28 +00008class SDNodeProperty;
Artem Belevich786ca6a2017-10-12 17:40:00 +00009
10class ValueType<int size, int value> {
11 string Namespace = "MVT";
12 int Size = size;
13 int Value = value;
14}
15
16class LLVMType<ValueType vt> {
17 ValueType VT = vt;
18}
19
20class Intrinsic<string name, list<LLVMType> ret_types = []> {
21 string LLVMName = name;
22 bit isTarget = 0;
23 string TargetPrefix = "";
24 list<LLVMType> RetTypes = ret_types;
25 list<LLVMType> ParamTypes = [];
26 list<IntrinsicProperty> IntrProperties = [];
Matt Arsenault303327d2017-12-20 19:36:28 +000027 list<SDNodeProperty> Properties = [];
sstefan199d18f72020-08-26 10:37:48 +020028 bit DisableDefaultAttributes = 1;
Artem Belevich786ca6a2017-10-12 17:40:00 +000029}
30
31def iAny : ValueType<0, 253>;
32def llvm_anyint_ty : LLVMType<iAny>;
33
34// Make sure we can return up to 8 values
Reid Kleckner5d986952019-12-11 07:55:26 -080035// CHECK: returns_8_results = {{[0-9]+}}, // llvm.returns.8.results
Artem Belevich786ca6a2017-10-12 17:40:00 +000036def int_returns_8_results : Intrinsic<"llvm.returns.8.results",
37 [llvm_anyint_ty, llvm_anyint_ty, llvm_anyint_ty, llvm_anyint_ty,
38 llvm_anyint_ty, llvm_anyint_ty, llvm_anyint_ty, llvm_anyint_ty]>;